Jump to content

php strpos error


ss23

Recommended Posts

try this instead

 

I moved the first ) from after ['text'] to the end of the strpos() function where it belongs. You needed to have the , "timer" inside the strpos function as it's required to be.

 

if (strpos($con['buffer']['text'], "timer")) !== FALSE){
cmd_send(prep_text("Time", date("F j, Y, g:i a", time())));

}

 

Please let me know if that worked

Link to comment
https://forums.phpfreaks.com/topic/47720-php-strpos-error/#findComment-233037
Share on other sites

unexpected T_IS_NOT_IDENTICAL. I think the bracket should be there as its ($con[d][d]). Thats the variable needed to compare. I think...

 

 

I've never seen that error before but here is the information on strpos()

 

http://php.net/strpos

 

 

int strpos ( string $haystack, mixed $needle [, int $offset] )

As you can see from that site, you need to have at least strpos($1, $2) within the quotes. The int $offset is optional but the others are required.

 

Link to comment
https://forums.phpfreaks.com/topic/47720-php-strpos-error/#findComment-233044
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.