How do I echo a comma on all but the last value? Here\'s my code:
while ($servdescarrayrow = mysql_fetch_array($servdescarray)) { ECHO $servdescarrayrow
you can remove the last comma after generating the string like so:
$str = ''; while ($servdescarrayrow = mysql_fetch_array($servdescarray)) { $str .= $servdescarrayrow['serv_desc'].","; } $str = substr($str, 0, strlen($str) - 1); echo $str;