I'm using these codes.
$blog = mysql_query("SELECT * FROM blog ORDER BY id");
while($sutun = mysql_fetch_array($blog)) {
$fake = $sutun["date"];
echo "$fake";
}
When i use echo"$fake";
I can see all of my rows. But when I use <?php echo "$fake" ?>
, It shows just 1 row for me.
I want to all of my rows while I'm using <?php echo "$fake" ?>
.
Beacuse The echo"$fake";
in with in a loop it will echo at every iteration thats why you can see all your rows but <?php echo"$fake"; ?>
executed when the loop is done so only the last row will be echoed;
You should seperate your logic like
<?php
$blog = mysql_query("SELECT * FROM blog ORDER BY id");
while($sutun = mysql_fetch_array($blog)) {
$fake = $sutun["date"];
?>
<?php
echo $fake;
}