I want to create an array with a message.
$myArray = array('my message');
But using this code, myArray will be overwritten if it already exists.
If I use array_push , it should already exist.
$myArray = array(); // <-- has to be declared first. array_push($myArray, 'my message');
Otherwise, he will deceive.
Is there a way to do the second example above without first clearing $myArray = array(); ?
arrays push php declaration
Corey
source share