Home / PHP Tips Generated By ChatGPT / Joining Array Elements into a String in PHP Join array elements into a string with a delimiter using implode(). Source Code $array = ['Hello', 'World', 'PHP']; $string = implode(" ", $array); echo $string; // Outputs: Hello World PHP