I am having trouble adding values to an array. The code I have is:
$newarray = array(value);
My problem is that I have this statement inside a while loop and it seems to add the value to the array and then delete the array when it exits the while loop.
Any ideas?
Here's one way to do it:
// set up our array $myArray = array(1, 3, 5, 7, 9);
//appen values to the array $myArray[] = 11; $myArray[] = 13;
you could probably do the same thing w/ array_push()
hth p.