RE: HOW DO I CREATE A LOOP CRAWLER?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



WOW! Rob you are a GENIUS. The second formula worked.
Let me clean it up and post what I got.

Would pot back as soon as I clean it up. 

Robert




--- "Atkinson, Robert" <ratkinson@xxxxxxxxxxxxx>
wrote:

> Tested version of the script is (could probably be
> refined using
> array_walk_recursive(), or something) :-
> 
> 
> <?php
> 
> $rows = array();
> $rows[0] = array(0,2,55,26,41,36,67,35,36,69);
> $rows[1] = array(4,11,24,26,36,38,45,35,44,48); 
> $rows[2] = array(1,0,13,9,35,33,47,25,39,55);  
> $rows[3] = array(5,12,14,54,35,36,48,65,55,87);  
> $rows[4] = array(0,2,55,26,41,36,67,35,36,69);   
> $rows[5] = array(1,3,13,24,35,42,42,45,39,70); 
> $rows[6] = array(1,2,3,64,8,37,6,49,35,36,48); 
> $rows[7] = array(9,11,24,26,16,38,45,35,44,48); 
> $rows[8] = array(3,0,13,9,35,23,47,25,39,55);  
> $rows[9] = array(5,12,15,14,35,36,43,65,55,87);  
> $rows[10] = array(0,5,55,26,31,36,67,35,36,69);   
> $rows[11] = array(1,3,17,24,34,42,42,45,33,70); 
> $rows[12] = array(1,1,3,66,8,37,6,49,35,36,48);
> $rows[13] = array(0,2,55,26,41,36,67,35,36,69);   
> $rows[14] = array(1,3,13,24,35,42,42,45,39,70); 
> $rows[15] = array(1,2,3,64,8,37,6,49,35,36,48); 
> $rows[16] = array(9,11,24,26,16,38,45,35,44,48); 
> $rows[17] = array(3,0,13,9,35,23,47,25,39,55);  
> $rows[18] = array(5,12,15,14,35,36,43,65,55,87);
> $rows[19] = array(0,2,55,26,41,36,67,35,36,69);   
> $rows[20] = array(1,3,13,24,35,42,42,45,39,70); 
> $rows[21] = array(1,2,3,64,8,37,6,49,35,36,48); 
> $rows[22] = array(9,11,24,26,16,38,45,35,44,48);  
> $rows[23] = array(1,0,13,9,35,33,47,25,39,55);  
> $rows[24] = array(5,12,14,54,35,36,48,65,55,87);  
> $rows[25] = array(0,2,55,26,41,36,67,35,36,69);   
> $rows[26] = array(1,3,13,24,35,42,42,45,39,70);
> $rows[27] = array(1,2,3,64,8,37,6,49,35,36,48); 
> $rows[28] = array(9,11,24,26,16,38,45,35,44,48); 
> $rows[29] = array(3,0,13,9,35,23,47,25,39,55);  
> $rows[30] = array(5,12,15,14,35,36,43,65,55,87);
> 
> 
> $max_rows = count($rows);
> 
> foreach ($rows as $array_key => $array_value) {
> 	echo "<br>Curr row = " . $array_key . " - <br>\n";
> 
> 	for ($i = 0; $i < $max_rows; $i++) {
> 		
> 		if ($array_key <> $i) {
> 			$common = array_intersect($array_value,
> $rows[$i]);
> 
> 			foreach ($common as $key => $value) {
> 				echo "Key: $key; Value: $value\n";
> 			}
> 		echo "<BR>";
> 		} 
> 	}
> }
> 
> ?>
> 
> 
> Rob.
> 
>  
> 
> -----Original Message-----
> From: php-objects@xxxxxxxxxxxxxxx
> [mailto:php-objects@xxxxxxxxxxxxxxx] On
> Behalf Of Atkinson, Robert
> Sent: 17 January 2008 15:36
> To: php-objects@xxxxxxxxxxxxxxx
> Subject: RE:  HOW DO I CREATE A LOOP
> CRAWLER?
> 
> Very roughly.....
> 
>
***********************************************************************************
> Any opinions expressed in email are those of the
> individual and not necessarily those of the company.
> This email and any files transmitted with it are
> confidential and solely for the use of the intended
> recipient 
> or entity to whom they are addressed. It may contain
> material protected by attorney-client privilege. If
> you are not the intended recipient, or a person
> responsible for delivering to the intended
> recipient, be advised that you have received this
> email in error and that any use is strictly
> prohibited.
> 
> Random House Group + 44 (0) 20 7840 8400
> http://www.randomhouse.co.uk
> http://www.booksattransworld.co.uk 
> http://www.kidsatrandomhouse.co.uk
> Generic email address - enquiries@xxxxxxxxxxxxxxxxx
> 
> Name & Registered Office:
> THE RANDOM HOUSE GROUP LIMITED
> 20 VAUXHALL BRIDGE ROAD
> LONDON
> SW1V 2SA
> Random House Group Ltd is registered in the United
> Kingdom with company No. 00954009, VAT number
> 102838980
>
***********************************************************************************
> 
> 



      ___________________________________________________________
Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux