Home / PHP Tips Generated By ChatGPT / Converting a String to an Array in PHP Use explode() to split a string into an array based on a delimiter. Source Code $text = "one,two,three"; $parts = explode(",", $text); print_r($parts);