I need to add a counter to the loop as well as pulling contents. What is the syntax for adding the "and for ($ColCount = ColCount + 1)"
<?php $ColCount = 0?>
<!--get artwork thumbnails -->
<?php
$dbname = 'pdartist2';
$table = 'artwork';
// query
$result = mysql_query("SELECT AID, ThumbFilePath, Title, DisplayOrder FROM artwork where SCID = '$SCID' ") or die(mysql_error());
while($row = mysql_fetch_row($result))
{
foreach($row as $cell)
and for ($ColCount = ColCount + 1)
echo "$ColCount", "$cell";
}
mysql_free_result($result);
?>