[PHP] Fatal error when calling nested function

2007-10-26 Thread Kefaleas Stavros
Here's the list : ?php function salestax($price,$tax) { function convert_pound($dollars, $conversion=1.6) { return $dollars * $conversion; } $total = $price + ($price * $tax); echo Total cost in dollars: $total. Cost in British pounds: .convert_pound($total); } echo convert_pound(15); ? I get

RE: [PHP] Fatal error when calling nested function

2007-10-26 Thread Edward Kay
Here's the list : ?php function salestax($price,$tax) { function convert_pound($dollars, $conversion=1.6) { return $dollars * $conversion; } $total = $price + ($price * $tax); echo Total cost in dollars: $total. Cost in British pounds: .convert_pound($total); } echo

Re: [PHP] Fatal error when calling nested function

2007-10-26 Thread Kefaleas Stavros
Edward Kay wrote: Here's the list : ?php function salestax($price,$tax) { function convert_pound($dollars, $conversion=1.6) { return $dollars * $conversion; } $total = $price + ($price * $tax); echo Total cost in dollars: $total. Cost in British pounds: .convert_pound($total); } echo

Re: [PHP] Fatal error when calling nested function

2007-10-26 Thread Kefaleas Stavros
Edward Kay wrote: Here's the list : ?php function salestax($price,$tax) { function convert_pound($dollars, $conversion=1.6) { return $dollars * $conversion; } $total = $price + ($price * $tax); echo Total cost in dollars: $total. Cost in British pounds: .convert_pound($total); } echo

RE: [PHP] Fatal error when calling nested function

2007-10-26 Thread Edward Kay
?php function salestax($price,$tax) { function convert_pound($dollars, $conversion=1.6) { return $dollars * $conversion; } $total = $price + ($price * $tax); echo Total cost in dollars: $total. Cost in British pounds: .convert_pound($total); } salestax(15.00,.075); echo br / .