By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

Calculating

P: n/a
Hi all PHP gurus,

how can I solve this:
I have filled variable total (total oredr)
This variable I must recalculate before sending, ie (look at HERE word)

total = 100

Example
---------------------
function process_button() {
global $order;

$process_button_string = web_draw_hidden_field('x_login', blah blah
....) .
HERE web_draw_hidden_field('x_amount',
number_format($order->info['total'], 2)) .

Here must total be not 100, but divided with 5.85

How can I do that?

I have tryed
web_draw_hidden_field('x_amount', number_format($order->info['total/5.85'],
2)) .
but did not work

Thank you
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Test wrote:
web_draw_hidden_field('x_amount',

number_format($order->info['total/5.85'],2))

does $order->info['total/5.85'] exist?

what you want is number_format($order->info['total']/5.85,2)

Jul 17 '05 #2

P: n/a
Test wrote:
web_draw_hidden_field('x_amount',

number_format($order->info['total/5.85'],2))

does $order->info['total/5.85'] exist?

what you want is number_format($order->info['total']/5.85,2)


Ahhh... thank you
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.