Im no php guru, just a newbie ...
my data is stored in excel file .. I use a programe to convert it to a sql file which is all good .. the problem I am having is in excel, the price cell is formated to show $ + 0 decimal places .. when it is converted to a sql file it drops the formating to no symbol and 1 decimal place ...
Is it posible to force it to 0 decimals so it is just 10 rather than 10.3?
Also an if statement so if there is no data in the mysql price cell .. return blank (so that cell has no data printed).
Any help on the intergration of the above would be great as I have tried a few ideas with no luck .. but again I am a newbie.
Below is a copy of my script:
Code: Select all
for ($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_assoc($result);
if ($i % 2) {
echo "<TR bgcolor="#CCCCCC">\n";
} else {
echo "<TR bgcolor="#0099CC">\n";
}
echo "<TD>".$rowї'description']."</TD><TD align="right">\$".$rowї'price']."</TD><TD>";
$image = $rowї'link'];
if ($image)
echo "<a href="$image" target="new"><strong><center>Link</center></strong></a>";
else
echo "<center></center>";
echo "</TD></TR>\n";Thanks
]{ronic