Home / PHP Tips Generated By ChatGPT / 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"