User Tools

Site Tools


uphp:functions:is_numeric

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:is_numeric [2017/04/10 13:51]
jeff
uphp:functions:is_numeric [2021/09/13 05:57] (current)
Line 1: Line 1:
-** +======is_numeric======
-**======is_numeric======+
  
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Check if a value is numeric (<html><b><span style="color:green">int<span style="color:black"></b></html>, <html><b><span style="color:green">float<span style="color:black"></b></html> or numeric <html><b><span style="color:green">string<span style="color:black"></b></html>)+<html>Check if a value is numeric (<b><span style="color:green">int<span style="color:black"></b>, <b><span style="color:green">float<span style="color:black"></b> or numeric <b><span style="color:green">string<span style="color:black"></b>)</html>
  
 ====Description==== ====Description====
  
-<well size="sm"> +<well size="sm"><html>
-<html>+
 <span style="font-size:125%;color:green">int <span style="font-size:125%;color:green">int
-<span style="color:black"> +<span style="color:black">is_numeric (
-</html> +
-[[is_numeric]] ( +
-<html>+
 <span style="color:green">mixed <span style="color:green">mixed
 <span style="color:blue">$value <span style="color:blue">$value
 <span style="color:black">) <span style="color:black">)
-</html> +</html></well>
-</well>+
  
 Check to see if a value is numeric Check to see if a value is numeric
Line 27: Line 21:
 <html><b><span style="color:blue">$value<span style="color:black"></b></html>:  Variable or expression to be evaluated <html><b><span style="color:blue">$value<span style="color:black"></b></html>:  Variable or expression to be evaluated
  
-====Return Value====+====Return Values====
  
-1 (true) if numeric, 0 (false) if not numeric (arrays always return 0)+<html><b><span style="color:green">Integer<span style="color:black"></b></html>:  1 (true) if numeric, 0 (false) if not numeric (arrays always return 0)
  
 ====Examples==== ====Examples====
Line 46: Line 40:
 </code> </code>
  
-**Set up an array of different types of values. Then iterate through the array and output each element type, value and whether is_numeric() returns true or false:**+===Set up an array of different types of valuesiterate through the arrayoutput type, value and whether is_numeric() returns true or false===
  
 <code php> <code php>
uphp/functions/is_numeric.1491832304.txt.gz · Last modified: 2021/09/13 05:56 (external edit)