Hi all,
I have a string with hold alpha & numeric characters. I need to test for the string length and then test to see if the first 7 characters of numeric.
This is what I have so far:
$_GET['p'] = "1337987 ezy8659 effr2590000 xh541207 lhr ist";
$smsstring = (strlen($_GET['p']));
I now know the length of the string but I don't know how to find out if the first 7 characters are numeric.
if($smsstring > 7) {
$str = $_GET['p'] ;
$str = explode(" ",$str);
$member_id = $str[0];
$wt_ref = $str[1];
$wt_pnr = $str[2];
$wt_des = $str[3];
$wt_dep = $str[4];
$wt_des = $str[5];
There may be better ways to do what I have already done, but it works so far.
Can anyone provide some advice.