Jump to content

[SOLVED] Quick Question on For Loop!


snowman15

Recommended Posts

I have no clue why this code isnt working. Check it out.

 

   <?php
		include('db.php'); // ASSUME CONNECTION AND VARIABLES WORK
    $sql = 'SELECT `people` FROM `users` WHERE `user` LIKE CONVERT(_utf8 \''.$_SESSION['user'].'\' USING latin1) COLLATE latin1_swedish_ci';
$result = $db->query($sql);
$row = mysqli_fetch_assoc($result);
for($i==1; $i<=$row['people'];$i++){
  echo'<option>'.$i.'</option>';
  }
 ?>

Link to comment
https://forums.phpfreaks.com/topic/112224-solved-quick-question-on-for-loop/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.