Converting a Number to a String in PHP


Use strval() to convert a number into a string format.

Source Code

$number = 123;
$string = strval($number);
echo $string; // Outputs: "123"
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments