ctype_alnum
IF
$var = 'as2df234asdf'; if (ctype_alnum($var)) { echo 'if'; } else { echo 'else'; }
Pro tip: use ```triple backticks around text``` to write in code fences