PHP: show a comma on all value except last value from mysql_fetch_array

$count = 0;
while ($servdescarrayrow = mysql_fetch_array($servdescarray)) {
    if ($count++ > 0) echo ",";
    echo $servdescarrayrow['serv_desc'];
}

Comments

Popular posts from this blog

PHP: Date Difference for PHP 5.2

HTML5 video loop src change on end play function

Custom OpenCart 2.3.0.2 theme