Answer the question
In order to leave comments, you need to log in
How to loop through an array separated by commas?
How to loop through an array separated by commas, and put a dot after the last element?
There is an associative array $tags,
Array ( [0] => Адин [1] => Два[2] => Три [3] => Четыре[4] => Пять)
foreach ($tags as $tgs) {
echo $tgs;
}
Answer the question
In order to leave comments, you need to log in
Krch, did not understand anything from what was written. I threw a simple script here with crutches.
$cnt = count($string2);
$i = 0;
while ($i < $cnt-1)
{
echo $string2[$i].", ";
$i++;
}
echo (end($string2)).".";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question