Is there a more efficient way to write the following?
<?php $result = mysql_query("SELECT priceList FROM catalog WHERE itemid='ABC1'",$db); printf("<i>List: <s>%s</s></i><br />\n", money_format('$%i', mysql_result($result,0,"priceList"))); ?>
I have many products per page and this code pulls the list price and formats it. It works fine, but I'd like to know if I can shorten it.
I've looked at number_format over money_format and it's a little shorter, but not by much. Are there better options than printf and mysql_result for my use?
Thanks, Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php