I'm trying to print each value in this array as a comma-delimited string.
$domainext = array("com","net","edu","uk","au","in","biz","ca","cc","cd","bz","by");
Here is how I'm doing it.
foreach ($domainext as $ext){
$ext = implode(', ', $domainext);
echo $ext."<br>";
echo "<br>";
}
this is the output.
com, net, edu, uk, au, in, biz, ca, cc, cd, bz, by <br>
(however, there are as many lines as there are array values)
I have tried using explode(), and it returns "array" with an error above it.
$ext = implode(', ', $domainext);inside the loop.implodeonce