<?php
$input = 'abcD 546aqwe';
if(preg_match('/^[a-zA-Z0-9\s]+$/', $input))
{
// $input was alpha numeric with space
echo 'true';
}
else{
echo 'false';
}
?>
<?php
$input = 'abcD 546aqwe';
if(preg_match('/^[a-zA-Z0-9\s]+$/', $input))
{
// $input was alpha numeric with space
echo 'true';
}
else{
echo 'false';
}
?>