Jump to content

[SOLVED] Haystack Needle


willpower

Recommended Posts

Hi Im dealing with UK postcodes

 

I need to check the first to chars in a $string against vars contained in an array.

 

ie

 

$postcode= "M23 4EF"

 

$Array_to Check = ('SW','NW','SF')

 

Not sure what is the best way to do this...

 

Just need to check if 1st chars in $postcode contain any of $Array_to_check and return tru/false/

 

Thanks

 

Will

Link to comment
https://forums.phpfreaks.com/topic/38762-solved-haystack-needle/
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.