add a new value to the end of an array of objects php code example Example: php append element to array array_push($cart, 13);