| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor|
formatting an array when select * is used
| 7:58 pm on Jun 30, 2009 (gmt 0)|
This is probably an easy answer, but when I use the code below my output is all on one line like
There are only 2 fields on this table, ID and ITEM.
I'd like it to print in this format:
$query = mysql_query("SELECT * FROM menu")
or die (mysql_error());
while ($data = mysql_fetch_array($query, MYSQL_ASSOC))
| 8:12 pm on Jun 30, 2009 (gmt 0)|
echo $data['ITEM']."<br />\r\n";
| 8:40 pm on Jun 30, 2009 (gmt 0)|
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
© Webmaster World 1996-2014 all rights reserved