❮ PHP Variable Handling Reference
Return the string value of 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 »
The strval() function returns the string value of a variable.
strval(
variable);
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | The string value of the variable on success |
---|---|
Return Type: | String |
PHP Version: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!