You are here: Re: Not return a value « PHP « IT news, forums, messages
Re: Not return a value

Posted by Ian Rutgers on 09/27/05 02:57

Never mind ----> I need to learn to type '-(


"Ian Rutgers" <irutgers@otima.ca> wrote in message
news:7T%Ze.558890$s54.261476@pd7tw2no...
> Please take a look at the function(s) below:
>
> function line_total($i)
> {
> $meal = $_POST['expen_meal'][$i];
> $travel = $_POST['expen_trav_method'][$i];
> $hotel = $_POST['expen_hotel'];
> $misc = $_POST['expen_misc'];
> $total_line = $meal + $travel + $hotel + $misc;
> return $total_line;
> }
>
> function expense_lines()
> {
> $str = '';
> for($i = 0; $i < 12; $i++)
> {
> $str .="<tr>". "<td>" . $_POST['expen_date'][$i] . "</td>" .
> "<td>" . $_POST['expen_description'][$i] . "</td>" .
> "<td>" . number_format($_POST['expen_exch_rate'][$i], 2, '.', ',') .
> "</td>" .
> "<td>" . number_format($_POST['expen_meal'][$i], 2, '.', ',') . "</td>"
> .
> "<td>" . number_format($_POST['expen_trav_method'][$i], 2, '.', ',') .
> "</td>" .
> "<td>" . number_format($_POST['expen_hotel'][$i], 2, '.', ',') . "</td>"
> .
> "<td>" . number_format($_POST['expen_misc'][$i], 2, '.', ',') . "</td>"
> .
> "<td>" . line_total($i) . "</td>" . "</tr>";
> }
> print_r ($str);
> }
>
> If I call the function expense_lines() without calling the function
> line_total($i), the function works correctly. With the call to the
> line_total($i) function, nothing is returned. Can someone point me in the
> right direction
>
> Thank you in advance for your help.
>
> Ian
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация