Re: Getting totals

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

 



Yeah, it counts how many times block is in $address, so if there's 254 ip's listed in the database, it will incriment it 254 times and display that.

----- Original Message ----- From: "Rabin Vincent" <rabin@xxxxxx>
To: "Rob W." <rob@xxxxxxxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Wednesday, June 07, 2006 2:03 AM
Subject: Re:  Getting totals


On 6/7/06, Rob W. <rob@xxxxxxxxxxxxxxx> wrote:
I got the fix, strstr didnt work right because it was relaying more than
just what I was thinking.

Here is the fix.

    $value=array(strstr($block, $address));
    foreach ($value as $var) {
      $block_total_ip++;
     }

How can this work? $value will have 1 element no matter what,
so $block_total_ip will always be incremented once. The above
code is equivalent to just:

$block_total_ip++;

Rabin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux