here is the example from php.net:
What I want is to put the variables "apple" and "raspberry" into a variable or array as inCode:<?php $stack = array("orange", "banana"); array_push($stack, "apple", "raspberry"); print_r($stack); ?>
While the above works I am not sure as to what the correct syntax should be. Does this look correct? Somehow I figure there should be escaped quotes in $fruit2.Code:<?php $fruit2="apple,raspberry"; $stack = array("orange", "banana"); array_push($stack, $fruit2); print_r($stack); ?>



Reply With Quote

Bookmarks