Jump to content

Recommended Posts

Hi, can anyone tell me how i can check to see if a large string contains a substring in any position at all, by this i mean that the substring could occur at the start, middle or end of the actual string. If the substring is found i would then like a flag to be raised. maybe using a boolean or something.

 

thanks guys!

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

 

 

Returns the numeric position of the first occurrence of needle in the haystack string. Unlike the strrpos(), this function can take a full string as the needle parameter and the entire string will be used.

 

www.php.net/function.strpos

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.