Object return value[solved]
Posted: Tue Mar 01, 2005 3:50 am
Following problem. I want to call an object and want to return 3 values.
php manual states to return an array so I do something like this in calculate funtion in the class.
So I call the object
when I echo out $val1, $val2 and $val3 they are empty allthough they should have values.
Any advice?
php manual states to return an array so I do something like this in calculate funtion in the class.
Code: Select all
$value1 = 3.14;
$value2 = "This is a value";
$value3 = 1;
return array($value1, $value2, $value3);Code: Select all
list ($val1, $val2, $val3) = $var->calculate();Any advice?