how to convert a string to an array in php [duplicate] May 19, 2023 by Tarik Use explode function $array = explode(' ', $string); The first argument is delimiter