Jump to content

Using strpos


unknown101

Recommended Posts

Hi Guys,

 

Im currently writing a script which compares strings using the "strpos" function.  If for example I had a variable which contained all the content from a website (HTML stripped out) and was looking for a particular string will strpos not work with spaces?

 

i.e. my search variable could be ...  $searchTerm = 'car: ford'  (noting the space in the string)

 

The website content is stored in say $siteContent and I know this string above is within the variable as I can print this to the browser, but doesnt seem to find it?

 

It works fine with single terms but thats it.

 

Thanks in advance

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/105421-using-strpos/
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.