Re: Linking stuff

From: Date: Tue, 08 Jul 2008 20:31:42 +0000
Subject: Re: Linking stuff
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-276459@lists.php.net to get a copy of this message
At 2:22 PM -0500 7/8/08, Philip Thompson wrote:
Hi all. I think I might be having a brain-fart afternoon, but I can't think of how to accomplish this. I want these "centers" to be linked to 1 another. If center A links to B and C, I want B to be linked to A and C, and C to A and B. So... it should look something like this: center link
A       B
A       C
B       A
B       C
C       A
C       B
These results will be stored in a database and each of the records is unique. To slightly simplify things (hopefully!), I can just store each of the centers in an array, like so: array(A,B,C,D). I figure I'll have to loop through the array (several times?) and do comparisons with each other one. Basically, I don't want to over-complicate this for myself. Any guiding light would be appreciated on how to link all of these! Thanks ~Philip
It looks like a permutation and sounds like a linked list. Maybe it would be better if you explained what you wanted to do wit it. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#276459) next »