Page 1 of 1

how to filter 12 digits integers in php

Posted: Wed Jun 24, 2009 5:53 am
by kuttus
how to filter the 12 digits integers in php can u help me buy giving the solution

Re: how to filter 12 digits integers in php

Posted: Wed Jun 24, 2009 8:42 am
by Eric!

Code: Select all

<?php
if (preg_match("[0-9]{12}", $data, $matches)) {
  echo "Match was found <br />";
  echo $matches[0];
}
?>