Not return a value
- From: "Ian Rutgers" <irutgers@xxxxxxxx>
- Date: Mon, 26 Sep 2005 23:54:43 GMT
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
.
- Follow-Ups:
- Re: Not return a value
- From: Ian Rutgers
- Re: Not return a value
- Prev by Date: Call to a member function on a non-object
- Next by Date: Re: Not return a value
- Previous by thread: Call to a member function on a non-object
- Next by thread: Re: Not return a value
- Index(es):