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 "£".number_format($total_with_discount,2)."";
?>
yeee haaaa, sorry was solved my fault.
word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wordwrap on a variable that is going to be emailed it puts the line breaks in well before it should.
PHP template help
Ok, I don't know if anyone can help me but I am using PHP templates to make a site. I am a newbie and so I am finding this quite difficult so I thought I would ask some folks much better than me. I
Can't seem to capture a variable in a chained select
I'm *this* close to having a chained select running but for some reason it doesn't seem to be picking up a variable.Code: <?phprequire ('inc/connection.php');//seeming that we are just
what are '%S%', '%E%'
for example when i see Code: [Select]printf("Hello %s\r\n", $name);what does %s means ?
Is there a function ... auto send IP
Is there some function that can be sent to a ddns service that returns the ip address of a ddns forward. I am working on a script that uses a dvr from a home and the owner wants to have the dvr stream
Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database assigns an ID number. The front end displays each upload by ID number. I'm trying to set up the back
Creating XML with php
I need to creat an XML with php and have successfully produced a valid output. The problem I have is that the XML requirements of the application that will import the XML requires that the XML file
Dynamic Data + Sql Server 2005 Enterprise?
Hi! I have just started to learn ASP.NET, and it looks like it is quite a lot to learn. Im not really sure where I should begin, but I have watched the Dynamic Data
Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still learning PHP and I have been for a few months now, but every now and then I get stuck on small things.
Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the data into database.Why can this happen? how to prevent this?