Checking for alphapbert in php

Is my code correct to check if the user input from actionscript is a alphapbert? and return a error message to actionscript


$postalno=substr($_GET["postal"],0,2);
if(ctype_alpha($postalno)){
$report.="error"."="."Error text enter number"."&";
echo $report;