Jump to content

[SOLVED] For each


timmah1

Recommended Posts

Can someone tell me why this only returns 1 row when there is actually 6 rows?

 

foreach ($itemCodes as $fieldName => $val){
     list($descr, $price) = explode("|", $val);
     $price = ($price == "N/A")? "N/A": sprintf("%.2f", $price);
   
   $products = array(             
               				
              	array($price, $descr, '')
	);

} 
[/code

I need it to display all 6
Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/136055-solved-for-each/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.