undertaker333 Posted August 26, 2011 Share Posted August 26, 2011 why it giving me single row record only... while loop is not working please help me.. <?php $comments= ""; $sql= "SELECT * FROM comment"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { $serials= $row['serial']; $names= $row['name']; $emails= $row['email']; $msges= $row['msg']; $date_added= $row['date']; $comments= "$names <br /> $msges <br /> $date_added"; } ?> Link to comment https://forums.phpfreaks.com/topic/245734-while-loop-mysql_fetch_array-not-working/ Share on other sites More sharing options...
undertaker333 Posted August 26, 2011 Author Share Posted August 26, 2011 I also try thiss... <?php $comments= ""; $result = mysql_query("SELECT * FROM comment"); while($row = mysql_fetch_array($result)) { $serials= $row['serial']; $names= $row['name']; $emails= $row['email']; $msges= $row['msg']; $date_added= $row['date']; $comments= "$names <br /> $msges <br /> $date_added"; } ?> Link to comment https://forums.phpfreaks.com/topic/245734-while-loop-mysql_fetch_array-not-working/#findComment-1262137 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.