Jump to content

[SOLVED] fifteen percent


jakebur01

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.