This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
uphp:functions:is_string [2017/03/09 16:51] jeff created |
uphp:functions:is_string [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
======is_string====== | ======is_string====== | ||
+ | |||
< | < | ||
- | Return 1 if the variable is a string | + | Check if a variable is a < |
====Description==== | ====Description==== | ||
- | <well size=" | + | |
- | <span style=" | + | <well size=" |
- | < | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
+ | <span style=" | ||
</ | </ | ||
- | Check if a variable or value is a string | + | Check to see if a variable or value is of type < |
- | ====Parameters==== | + | ====Parameter==== |
- | < | + | |
- | ====Return | + | < |
- | 1 (true) if a string, 0 (false) if not a string | + | |
+ | ====Return | ||
+ | |||
+ | < | ||
====Examples==== | ====Examples==== | ||
+ | |||
<code php> | <code php> | ||
<? | <? | ||
- | $x=1.0; | + | |
- | print(is_string($x)); | + | print(is_string($x)); |
- | $y=" | + | $y=" |
- | print(is_string($y)); | + | print(is_string($y)); |
- | $z='' | + | $z='' |
- | print(is_string($z)); | + | print(is_string($z)); |
?> | ?> | ||
</ | </ | ||
+ | |||
+ | ====Notes==== | ||
+ | |||
+ | This function checks ONLY the type of the variable, not the data that it holds! | ||
====See Also==== | ====See Also==== | ||
- | [[is_int()]] - Return 1 if the variable is an integer | ||
- | [[is_float()]] - Return 1 if the variable is a float | + | [[is_int()]] - Check if a variable is an < |
+ | |||
+ | [[is_float()]] - Check if a variable is a < | ||
+ | |||
+ | [[is_numeric()]] - < | ||
- | [[is_numeric()]] - Return 1 if the value is numeric (integer, float or string) | + | [[is_array()]] - Check if a variable |
- | [[is_array()]] - Return 1 if the variable | + | [[isset()]] - Check if a variable |
[[uphp: | [[uphp: | ||