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++;
}

----- Original Message ----- From: "Richard Lynch" <[EMAIL PROTECTED]>
To: "Rob W." <[EMAIL PROTECTED]>
Sent: Tuesday, June 06, 2006 8:58 PM
Subject: Re: [PHP] Getting totals



Put quotes or apostrophes on the strings...
if (strstr('192.168.100','192.168.100.10')) {

On Tue, June 6, 2006 8:46 pm, Rob W. wrote:
if (strstr(192.168.100,192.168.100.10)) {
  $inc++;
}
echo "$inc";

That returns nothing. What am i still doing wrong?

----- Original Message -----
From: "Rabin Vincent" <[EMAIL PROTECTED]>
To: "Rob W." <[EMAIL PROTECTED]>
Cc: <php-general@lists.php.net>
Sent: Tuesday, June 06, 2006 1:36 PM
Subject: Re: [PHP] Getting totals


On 6/6/06, Rob W. <[EMAIL PROTECTED]> wrote:
So far what I have gotten is a stristr match but it's not working
correctly. I have a variable that basically weed's out the last
digits of
the ip it's self from help previously

So my code so far is:

if (stristr($block,$address)) {
   $count_ip++;
}

You've got the parameters mixed up. strstr is (haystack,
needle) so you need strstr($address, $block). php.net/stristr.

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




--
Like Music?
http://l-i-e.com/artists.htm





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

Reply via email to