Find string is alphabet or numeric - Php

Find the string is alphabet or numeric

Snippet Code


  
Rate this page :
  [ 0 votes]

The following code is used to find the given string is numeric or alphabet.

$element = "10"; if (is_numeric($element)) { echo $element ."is numeric"; } else { echo $element ."is NOT numeric"; }

Tags


Ask Questions

Ask Question