RE: HOW DO I CREATE A LOOP CRAWLER?

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

 



Hi Rob, 

Hope you had a nice weekend. I was down with a cold so
I could not do much.  

About getting the result as a count. I used the count
idea because I guessed it would be easier to get me to
follow what the script was doing. It worked by the
way. Before I thought the script was not working on a
large table but with the 'count' it tells me the
number of interceptions on a particular row and then I
can visibly check if it's true and it works. The "key"
and "value" was spitting out so many results it was
hard to follow and was confusing. I guess the best way
is to use the "key" and "value" plus the "count"
together. This is the modified script to give the
count.

$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 count($common);
}
echo "<BR>";
} 
}
}


Robert


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

> That all depends on what you want to do with the
> script. Does the output need
> to be human readable, or is this merely a function
> within a larger program?
> 
> Rob. 
> 
> -----Original Message-----
> From: php-objects@xxxxxxxxxxxxxxx
> [mailto:php-objects@xxxxxxxxxxxxxxx] On
> Behalf Of Robert Barker
> Sent: 18 January 2008 17:20
> To: php-objects@xxxxxxxxxxxxxxx
> Subject: RE:  HOW DO I CREATE A LOOP
> CRAWLER?
> 
> Hi Rob,
> 
> I think I have an idea why I think it is not working
> with a larger array. I believe everything is working
> fine but to the human eye there is the problem
> because
> the output is confusing. It echoes the same result
> multiple times when it should do so once for each
> interception. Do you have an idea how to fix it? I
> am
> thinking instead of outputing the result as key and
> value to simply count and give I or 0 for each row.
> What do you think?
> 
>
***********************************************************************************
> 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