elogicmedia Posted July 21, 2005 Share Posted July 21, 2005 Hi, I need to get the product id and assign them into an array onto the checkout_confirmation.php page however when I call the id like: $order->products[$i]['id']; sometimes it will work and other products it comes out like: 50{5}13 or 30{5}13{6}15 where 50 or 30 is the product id. Any ideas how to over come this? Thanks Link to comment Share on other sites More sharing options...
elogicmedia Posted July 21, 2005 Author Share Posted July 21, 2005 OK I got this working buy using the explode function $pieces = explode("{", $order->products[$i]['id']); $pieces[0] is equal to the id. NOW does anyone know how I can put this into an array to use in the script down lower. e.g array $ids[0] = the first product $ids[2] = the second product etc etc ? Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2005 Share Posted July 21, 2005 OK I got this working buy using the explode function $pieces = explode("{", $order->products[$i]['id']); $pieces[0] is equal to the id. NOW does anyone know how I can put this into an array to use in the script down lower. e.g array $ids[0] = the first product $ids[2] = the second product etc etc ? <{POST_SNAPBACK}> Can you not just do $ids[0] = $pieces[0]; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.