strval
Get the string value of the variable
strval()
function returns the string value of the variable.
Returns string values for different variables:
<?php $a = "Hello" ; echo strval ( $a ) . "<br>" ; $b = "1234.56789" ; echo strval ( $b ) . "<br>" ; $c = "1234.56789Hello" ; echo strval ( $c ) . "<br>" ; $d = "Hello1234.56789" ; echo strval ( $d ) . "<br>" ; $e = 1234 ; echo strval ( $e ) . "<br>" ; ?>
Try it yourself
strval ( variable ) ;
parameter | describe |
---|---|
variable | Required. Specifies the variable to check. |