I need to split my string input into an array at the commas.
How can I go about accomplishing this?
9,admin@example.com,8
The Best choice is to use the function "explode()".
$content = "dad,fger,fgferf,fewf";
$delimiters =",";
$explodes = explode($delimiters, $content);
foreach($exploade as $explode) {
echo "This is a exploded String: ". $explode;
}
If you want a faster approach you can use a delimiter tool like Delimiters.co There are many websites like this. But I prefer a simple PHP code.