jakebur01 Posted July 9, 2007 Share Posted July 9, 2007 I am getting 15 percent of the item and adding it back to the item to get the Retail Price. But when I hit an item around 1,000 it acts crazy and displays something like this: # Walk-In Store Price: 2.30 # Your Internet Price: $2,799.00 It works fine when under 1,000 dollars. Here is the code: $phyprice = number_format($book['price'], 2); $$phyprice =str_replace(',','',$phyprice); $phypriceone = $phyprice * .15; $phypricetwo = $phypriceone + $phyprice; $phypricetwo = number_format($phypricetwo, 2); echo '<td><ul>'; echo '<li><b>Type:</b> '; echo $book['author']; echo '</li><li><b>Item:</b> '; echo $book['isbn']; echo '</li><li><b>Description:</b> '; echo $book['description']; echo '</li><li><strike>Walk-In Store Price:</strike> '; echo "<strike> $phypricetwo</strike>"; echo '</li><li><b>Your Internet Price:</b> '; $samicans = number_format($book['price'], 2); echo '$'; echo "<b>$samicans</b>"; Link to comment https://forums.phpfreaks.com/topic/59025-solved-fifteen-percent/ Share on other sites More sharing options...
AndyB Posted July 9, 2007 Share Posted July 9, 2007 er, retail price = your price * 1.15 ... what's the problem? Why $$phyprice? Link to comment https://forums.phpfreaks.com/topic/59025-solved-fifteen-percent/#findComment-292993 Share on other sites More sharing options...
jakebur01 Posted July 9, 2007 Author Share Posted July 9, 2007 no problem.. Thank you.. Link to comment https://forums.phpfreaks.com/topic/59025-solved-fifteen-percent/#findComment-292998 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.