Insert name into an array
Posted: Fri Jul 06, 2012 4:55 pm
Hi all,
I have an array of several hundred names. I need to insert the name of spouse into the array.
How do I insert Jane Doe after John Doe?
Thanks in advance for your help.
I have an array of several hundred names. I need to insert the name of spouse into the array.
How do I insert Jane Doe after John Doe?
Thanks in advance for your help.
Code: Select all
$array = ("John Smith", "John Doe", "John Jones");
$spouse1 = "John Doe";
$spouse2 = "Jane Doe";
// I want array to be...
// $array = ("John Smith", "John Doe", "Jane Doe", "John Jones");