so, the code would be something like:
$getdata = mysql_fetch_array(mysql_query("SELECT * FROM data WHERE data=1"));
// the "i" after the pattern delimiter indicates a case-insensitive search
if (preg_match ("/2/i", "$getdata[data]")) {
print "A match was found.";
} else {
print "A match was not found.";
}
where $getdata[data] is my line of numbers, like 12345?