explode function in php for string code example Example: string to array in php print_r(explode(',',$yourstring));