Page 1 of 1

PHP HELP PLEASE

Posted: Thu Oct 07, 2010 7:10 am
by ardoa

Code: Select all

<td <? if (count($arr_invoice_listing)) { echo "colspan=\"3\""; } else { echo "colspan=\"2\""; } ?> class="invoice-detailbelow">
								<?=system_showText(LANG_LABEL_MAKE_CHECKS_PAYABLE);?> <?=$invoice_company?>
								<br />
								<b><?=system_showText(LANG_QUESTIONS);?>:</b> <?=system_showText(LANG_PLEASECALL);?> <?=$invoice_phone?>
								<br />
								<strong style="font-size: 8pt;"><?=system_showText(LANG_MSG_THANK_YOU);?></strong>
							</td>
							<th colspan="2" class="invoice-total"><?=system_showText(LANG_LABEL_TOTAL);?>: <span><?=CURRENCY_SYMBOL?><?=format_money($invoiceObj->getString("amount"))?></span> -


<?php
$first_number = 550;
$second_number = $amount;
$sum_total = $second_number * $first_number;
print ($sum_total);
?>
&nbsp;Pesos


</th>
						</tr>
					</table>

				</td>

I need multiply a variable value <?=format_money($invoiceObj->getString("amount"))?> * 550 as you see, but it doesnt work.
please anyone can help???

thanks

Re: PHP HELP PLEASE

Posted: Thu Oct 07, 2010 8:33 am
by twinedev
From this code, I $amount is not set to anything, Make sure it is set before you use it (it may be in another part of the code you didn't post).

Right before you use it, do var_dump($amount) to make sure it is set to value you think it should be.

-Greg