Hi …
Have recently started in PHP.
Have rebuilt a page to add functionality.
At the end of a build I have an array that outputs values like this which i use on the next page.
Array (
[0] => stdClass Object ( [imageName] => homebtn.png [name] => Shawn Product 1 [price] => 200.00 [id] => 1 )
[1] => stdClass Object ( [imageName] => homebtnrollover.png [name] => Shawn 2 [price] => 200.00 [id] => 2 )
[2] => stdClass Object ( [imageName] => e.jpg [name] => fff [price] => 345.00 [id] => 6 ) )
This format does work on the page I want to use it on, so I have tried to change the page to accept my values, but its not working, as the ripple is huge.
If i can get my array output to look the the original output, like this:
Array (
[facebook.png] => Array (
[0] => New Brand,New Product,New Desc,200.001 )
[homebtn.png] => Array (
[0] => Deci,Decimal Prod 1,Deci Description,854.991 )
[241-0.htm] => Array (
[0] => MUSCLE MEDS,Deci Prod 3,Prod 3 deci,50.101 ) )
How do i manipulate my array at top, to look the same as the below output?
Thanks.
$SQL = “SELECT imageName, name, price, id FROM product WHERE id = ‘$ID’”;
$query = mysql_query($SQL);
while ($productresult[] = mysql_fetch_object( $query ) );
array_pop ($productresult);
}
Fields are - ImageName, Name, price, description, id
I dont need that 1 at the end of the 2cnd array, and i do nt need ID from the top array.
Thanks for the help.