I want to combine two arrays.
Posted: Sat May 17, 2008 2:18 pm
I have this code:
What I'm aiming for is to combine the two arrays into a single new array with a result output in the line of:
$new_array = array ('2 Spades', '2 Clubs', '2 Hearts', '2 Diamonds', '3 Spades', '3 Clubs'); ... etc.
I hope you understand what I'm getting at, I only have limited PHP knowledge?
Code: Select all
$cards = array ();
$cards = array ('2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A');
$suits = array ();
$suits = array ('Spades', 'Clubs', 'Hearts', 'Diamonds');$new_array = array ('2 Spades', '2 Clubs', '2 Hearts', '2 Diamonds', '3 Spades', '3 Clubs'); ... etc.
I hope you understand what I'm getting at, I only have limited PHP knowledge?