Jump to content

[SOLVED] Wildcard operator in a php statement


hansenb88

Recommended Posts

Hi, I am very new to php and was wondering if there was a wildcard operator that could be included in an if statement similar to the % operator in a mySQL query. My if statement begins like this: if ($yourfield == 'restaurant' ||...  Is it possible to put in any character or command after the equal that would be like searching for 'rest%' when using mySQL? So that if the user spells a word wrong it will still execute that section of the code?

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.