cabbie Posted October 1, 2013 Share Posted October 1, 2013 Im doing a PDO query and need help with the while loop and printout. Without showing the whole script here is the code,, Need a printout similar to this.. I can do the html etc. A format easy to read for surveyor. Voter ID 9003256Name John DoeAddress 123 Main StPhone 5553123698 http://libertarian-forum.com/larimerlp/survey.php $query = $db->query("SELECT * FROM `members` WHERE `members` . `index` = $que"); $rows = $query->fretchAll(PDO::FETCH_ASSOC); Link to comment https://forums.phpfreaks.com/topic/282613-print_r/ Share on other sites More sharing options...
alpine Posted October 1, 2013 Share Posted October 1, 2013 while($rows = $query->fetch(PDO::FETCH_ASSOC)){ echo "<p>Voter ID ".$rows['voter_id']."</p>"; // next results } Link to comment https://forums.phpfreaks.com/topic/282613-print_r/#findComment-1452091 Share on other sites More sharing options...
cabbie Posted October 1, 2013 Author Share Posted October 1, 2013 Thanks.. I had to SELECT each one but that works.. Link to comment https://forums.phpfreaks.com/topic/282613-print_r/#findComment-1452101 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.