seandisanti wrote:The $_SESSION['sandwiches'] would contain a whole list of objects. If you set a __toString() method in your sandwich class, then you could just explode $_SESSION['sandwiches'] with a delimiter string of '<br />' to have it print a whole list of all of them
except that my $_SESSION['sandwich'] does not contain a whole list of objects, im only able to assign a single object to it. you know what, now that im thinking about it i think my whole page structure is flawed. it may be better if I just go back and re-do them so that all the items are on one page. but i mean im just spitballing here. maybe a check box that returns the item name string to a
- Code: Select all
$_SESSON['sandwich']=toString($item1 + $item2 + ...+$item#)
and i think I can put that session in an array_push($new_array, $_SESSION[sandwich']);
the way that ai have it set up now, the user has to go through the order process to cart and then click on the link for menu to add another item.
EDIT:
Oh, i think i see what your saying now. your saying that the $_SESSION['sandwich'] should pass more than one variable. i think im actually going that direction now.