Transfer from array to array

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Ok now that I've got the start of my card game going, I need to make a
third array that corresponds to the values generated from the shuffle().

My constant array $cards() holds the names of the cards in suit and
numerical order. So that will always remain intact regardless of what any
other values change.

Let's say shuffle() produced array[1] as 72, and that corresponds to "10 of
spades" in the cards array. How could I easily write the code to do this
without creating 104 lines of code to do it with?
For or "foreach"?

Re: Transfer from array to array

On Sun, 25 Apr 2010 18:26:23 -0700, richard wrote:

Quoted text here. Click to load it

Ok that's been worked out. Just shuffle the array I want.

Site Timeline