Tuesday, March 3, 2015

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'];
}

No comments:

Post a Comment