jonaofarc Posted September 9, 2008 Share Posted September 9, 2008 how does one look for a string with an array? like array -> california ->nevada in a string. Basically I want to be able to search a string for us states, and if a state is found I can echo the state or have it as its own variable. any ideas? Link to comment https://forums.phpfreaks.com/topic/123434-how-does-one-look-for-a-string-with-an-array-like-array-california-nevada/ Share on other sites More sharing options...
JasonLewis Posted September 9, 2008 Share Posted September 9, 2008 To find if something is in a string you can use strpos(). You may also find strlen() useful for extracting the text from the string. Link to comment https://forums.phpfreaks.com/topic/123434-how-does-one-look-for-a-string-with-an-array-like-array-california-nevada/#findComment-637491 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.