Jump to content

Archived

This topic is now archived and is closed to further replies.

stubarny

using a range of numbers as a wildcard

Recommended Posts

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

Share this post


Link to post
Share on other sites
[code=php:0]
if (in_array(36544,range(19968,40891)) {
  echo "match found";
}
[/code]

Share this post


Link to post
Share on other sites
not quite sure what you want, but this may help

[code]<?php
$var = 36544;
if($var >= 19968 && $var <= 40891) echo 'match';
?>[/code]

Share this post


Link to post
Share on other sites

×

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.