Jump to content
MakeWebGames

Recommended Posts

Posted

all i need to know is how to update a couple things by percent i need how to do

+ 5%

+10%

+3%

+25%

i do not know how to do percents at all and have been working on something for a while but im stuck because of that

Posted

You know, sometimes there is only one way to process a string, yet someone asks for an example, so for the sake of it - enter some code that's no simpler to understand than the string above.

 

<?php

$total = 200;
$whole = 100;
$percent = 10;

$value = ($total / $whole) * $percent;
Posted

ok thanks sorry im still teaching myself as i go i know a lot at this point but still sometimes need things explained in a way thats so simple my 6 year old niece would understand thank you :)

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.   Paste as plain text instead

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