Help with array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NEWDAY
Forum Newbie
Posts: 12
Joined: Wed Jan 31, 2007 5:15 pm

Help with array

Post by NEWDAY »

There are 2 list first a list containing names of females e.g. (sara, amanda,anna etc..)
also a list containing names of males ( nolan, chris,steven etc...)

I want to use php to make all possible mixtures of 2 names like (sara nolan, sara steven,amanda chris, anna steven etc...) put in mind that the first name has to be a female and the second a male, is it possible?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Help with array

Post by requinix »

Put one foreach inside another. Doesn't matter which does the males and which does the females.
Post Reply