Move $get assignment to if/else.

Signed-off-by: Eric Roberts <eric@cryode.com>
Replace is_numeric() with ctype_digit()

Signed-off-by: Eric Roberts <eric@cryode.com>