adding up might be solved tell us cheers.


Posted on 16th Feb 2014 07:03 pm by admin

i think i finally solved this anybody.

last time i was getting the wrong results.

Code: <?php

// price of item.
$price="100.00";

//quenity of items.
$quenity="7";

// tax rate.
$tax="17.50";

//discount rate.
$discount="25%";

// monthly payments.
$payments="12";

//total price x queniety.
$total=$price*$quenity;

// add pretax up, divide tax via 100.
$pretax=$tax/100;

//add a 1 to pretax to get the decimal point.
$total_tax=$pretax+1;

//total with out tax.
$total_with_out_tax=$total;

//total with tax.
$total_with_tax=$total*$total_tax;

//total with discount.
$total_with_discount=$total_with_tax-$discount;

//monthly payments.
$monthly_payments=$total_with_tax/$payments;


echo "&pound".number_format($total_with_discount,2)."";

?>



yeee haaaa, sorry was solved my fault.

342 Like 5 Dislike
Previous php-forum Next php-forum
Other php-forum

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

need help with date function
i have following form for date

Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

Beginners syntax and loop questions - help please!
Hi everyone,

I have some problems with php code. I'm currently in the middle of learning php,

mysql UNION | warning mysql_fetch_array !!
Code: <?php
$i = 0;
$query1="SELECT * FROM `products` WHERE `div

This is driving me nuts!
This insert query looks to be alright, however I get this error:

QuoteYou have an error in yo

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

Character Sets/Collations Stuff
Can someone please give me a check list of things I must do to setup all the charset stuff for my ph

help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when

COde for a Cc
I'm not receiving $ft as a Cc. Why is that??

$to = "$email";
$headers = "Fr

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash