alohatofu Posted April 25, 2007 Share Posted April 25, 2007 Hello, $display[] = $row['firstName'']; how would I display the lastname also? $display[] = $row['firstName''lastName']; ? that didnt' seem to work. thanks Link to comment https://forums.phpfreaks.com/topic/48571-solved-display-array/ Share on other sites More sharing options...
benjaminbeazy Posted April 25, 2007 Share Posted April 25, 2007 $display = "{$row['firstName']} {$row['lastName']}"; Link to comment https://forums.phpfreaks.com/topic/48571-solved-display-array/#findComment-237828 Share on other sites More sharing options...
alohatofu Posted April 25, 2007 Author Share Posted April 25, 2007 Hmm.. that didn't seem to work. Now its' not displaying anything while($row=mysql_fetch_array($query)) { $display = "{$row['firstName']} {$row['lastName']}"; } foreach($display as $d) { Link to comment https://forums.phpfreaks.com/topic/48571-solved-display-array/#findComment-237829 Share on other sites More sharing options...
benjaminbeazy Posted April 25, 2007 Share Posted April 25, 2007 while($row=mysql_fetch_array($query)) { echo "{$row['firstName']} {$row['lastName']}<br/>"; } Link to comment https://forums.phpfreaks.com/topic/48571-solved-display-array/#findComment-237834 Share on other sites More sharing options...
alohatofu Posted April 25, 2007 Author Share Posted April 25, 2007 That didn't output anything Link to comment https://forums.phpfreaks.com/topic/48571-solved-display-array/#findComment-237837 Share on other sites More sharing options...
benjaminbeazy Posted April 25, 2007 Share Posted April 25, 2007 sorry had an equals sign in there, try again Link to comment https://forums.phpfreaks.com/topic/48571-solved-display-array/#findComment-237840 Share on other sites More sharing options...
alohatofu Posted April 25, 2007 Author Share Posted April 25, 2007 Thanks! that did it. Link to comment https://forums.phpfreaks.com/topic/48571-solved-display-array/#findComment-237841 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.