how to append an element to an array in php code example Example: php append element to array array_push($cart, 13);