BigTime Posted September 1, 2012 Share Posted September 1, 2012 Is this possible? I have a defined variable that I need to check against like: if ($_POST['home'] LIKE '$user%'){ //SQL UPDATE $_POST['home'] might be something like Wellingfield Blue whereas user would always be just Wellingfield Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/267898-if-var-like-var2/ Share on other sites More sharing options...
xyph Posted September 1, 2012 Share Posted September 1, 2012 stristr ? stripos ? preg_match ? Quote Link to comment https://forums.phpfreaks.com/topic/267898-if-var-like-var2/#findComment-1374533 Share on other sites More sharing options...
BigTime Posted September 1, 2012 Author Share Posted September 1, 2012 Thanks xyph Although I don't really need position, stripos() worked for me Quote Link to comment https://forums.phpfreaks.com/topic/267898-if-var-like-var2/#findComment-1374538 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.