Hey I am just cleaning up your code a bit. I just think you copy and pasted it wrong. How you had it would have given you an error if my memory serves me right. Which we all know how that is at times! :-D
Ok so try this one out for size and see if that gives you what you want.
<?php
//FORMAT DATE USER VIEW
Function viewDate($viewDate) {
If ($viewDate) {
$fields = str_replace('-','',explode("-", $viewDate));
$strYear = $fields[0];
$strMonth = $fields[1];
$strDay = $fields[2];
$viewDate = "$strMonth-$strDay-$strYear";
return $viewDate;
}
print "<table class='sql' >";
print "<tr>";
print "<td width=13\%>$line[ponum]</td>";
print "<td width=35\%>$line[vendor]</td>";
print "<td width=12\%>";
$returned_value = viewDate($line[duedate]);
echo "$returned_value";
print "</td>";
?>
Take it easy,
Chad