- var_dump: documentation ( source)
- preg_match: documentation ( source)
- preg_match_all: documentation ( source)
- implode: documentation ( source)
- explode: documentation ( source)
<?php
var_dump(preg_match('#[^0-9./]#','/123l/'));
if(!preg_match('#[^0-9./]#','/123l/'))
{
echo "Value is numeric \n";
}
else
{
echo "Value not numeric \n";
}
$plate_number = '1234/5474';
preg_match_all('#[0-9]#',$plate_number,$new_plate_number);
var_dump($new_plate_number);
var_dump(implode('',$new_plate_number[0]));
$arr = explode('1',$plate_number);
var_dump($arr);