Jump to content

[SOLVED] multiplying a percentage


LOUDMOUTH

Recommended Posts

I have this code that updates a number

$newenergy = $updated_user->energy + (25 * $num_updated) * $multiplier;

 

I am looking to change it to + 25% * $multiplier

 

Can anyone help me make my current string this way?  I am not sure how to use percentages in php.

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/170674-solved-multiplying-a-percentage/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.