Re: Getting totals
| From: | Rob W. | Date: | Wed, 07 Jun 2006 05:14:05 +0000 |
| Subject: | Re: Getting totals | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237529@lists.php.net to get a copy of this message | ||
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++;
}
----- Original Message ----- From: "Rabin Vincent" <rabin@rab.in>
To: "Rob W." <rob@fiberuplink.com>
Cc: <php-general@lists.php.net>
Sent: Tuesday, June 06, 2006 11:38 PM
Subject: Re: [PHP] Getting totals
On 6/7/06, Rob W. <rob@fiberuplink.com> wrote:Sorry for the miss understanding, That's the way the viarable will look, i'm putting it in as a viariable. if (strstr($block,$address)) { $inc++; }Like I said before, strstr's argument list is haystack (what to search in) first and then needle (what to search for). Therefore, you need to have: strstr($address, $block); Rabin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php