stubarny Posted July 27, 2006 Share Posted July 27, 2006 Hi,I'm trying to search for a wildcard within a variable. My question is how can i set the wildcard to be a range of numbers?e.g. my wildcard range of 19968 to 40891 should match the variable "&# 36544 ;"Thanks for your help!Stu Quote Link to comment https://forums.phpfreaks.com/topic/15822-using-a-range-of-numbers-as-a-wildcard/ Share on other sites More sharing options...
trq Posted July 27, 2006 Share Posted July 27, 2006 [code=php:0]if (in_array(36544,range(19968,40891)) { echo "match found";}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/15822-using-a-range-of-numbers-as-a-wildcard/#findComment-64749 Share on other sites More sharing options...
ryanlwh Posted July 27, 2006 Share Posted July 27, 2006 not quite sure what you want, but this may help[code]<?php$var = 36544;if($var >= 19968 && $var <= 40891) echo 'match';?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/15822-using-a-range-of-numbers-as-a-wildcard/#findComment-64765 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.