If I define an array in PHP such as (I don\'t define its size):
$cart = array();
Do I simply add el
You can use array_push. It adds the elements to the end of the array, like in a stack.
You could have also done it like this:
$cart = array(13, "foo", $obj);