Home / PHP Tips Generated By ChatGPT / Appending Elements to an Array Using array_push() in PHP Add one or more elements to the end of an array. Source Code $stack = array("orange", "banana"); array_push($stack, "apple", "raspberry"); print_r($stack);