$result = mysql_query("SELECT * FROM Persons");
while($row = mysql_fetch_array($result))
{
echo $row['FirstName'];
echo $row['LastName'];
}
I want it with a $i ++ so i get 1 then 2 and so on, so i can make like this:
$result = mysql_query("SELECT * FROM Persons");
while($row = mysql_fetch_array($result))
{
if($i == 1){
<div>
echo $row['FirstName'];
echo $row['LastName'];
</div>
}
elseif($i == 2){
echo $row['FirstName'];
echo $row['LastName'];
}
You can just create the counter variable yourself, like so: