thanks, no it's not homework. It's for my website.

David


James Keeline <[EMAIL PROTECTED]> wrote:                               --- 
David <[EMAIL PROTECTED]> wrote:
 
 > Help! following up on advise I got from an earlier question, I've been
 > struggling with this for hours. I'm trying to generate a simple list
 > of unique pairs from a list of 4 items for example, I start with
 > $names = "david,dianne,phillip,phyllis" 
 > 
 > I explode them into an array but  I can't figure out how to
 > generate the unique list of pairs. I don't want relults like 
 > "david david" 
 > 
 > I've tried some recursive stuff but I keep winding up in infinate loops.
 
 You are probably trying to over-engineer the problem.  Take a look at the
 example on http://us2.php.net/manual/en/function.array-rand.php since it is
 almost exactly what you are looking for.  PHP has a function for nearly
 everything.
 
 Just to be clear, this isn't a homework assignment, right?  We get a lot of
 that at the beginnings or endings of school years in this group.
 
 James Keeline
 
 
     
                               


[Non-text portions of this message have been removed]

Reply via email to