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 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 ? 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 Link to comment https://forums.phpfreaks.com/topic/267898-if-var-like-var2/#findComment-1374538 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.