I'm somewhat new to php and have a slight dilemma with a cart.
I receive a string dilimited by "~". Within this string is colon delimited data such as:
$data=widget,price~anotherwidget,price
I would like to have only the price installed in a database for each widget: I'm thinking something along the lines of:
$contents=split("~", $data);
foreach($contents as $query) {
$cart_variable = explode(",", $query);
$price=$cart_variable[2];
//INSERT PRICE HERE
}
Obviously no error checking...just wondering how far off I am.
Thanks