View Single Post
Old 02-12-2013, 06:22 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Yes, you can use a while loop, but not a foreach unless you upgrade to 5.4.
I wish they wouldn't change something like Traversable unless its in a major version; minor versions simply create confusion.

Edit:
Wait I'm wrong here. The foreach is already the results of a fetch_assoc call. I thought that was the result of the mysqli_result.
In that case, you're simply missing your while loop. Looks to me that you'll likely have a normalization issue as well since I see you exploding on ||.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote