|
Posted by Jiri Fogl on 09/25/06 17:00
What about reference-passed variable as an argument?
For example:
<?php
function MyFunc ($input, &$return_array)
{
if (!empty($input))
{
$return_array = Array($input, date('H:m:s'));
return true;
}
else
return false;
}
$a = Array();
if (MyFunc('Hello', $a))
print_r($a);
else
echo 'Empty input!';
?>
For details on arguments passed by reference:
http://cz.php.net/manual/en/functions.arguments.php
The87Boy napsal(a):
> Is there any ways to make a function like system(), which returns more
> than one value (true or false) and (the array)
>
Navigation:
[Reply to this message]
|