I donot understand your problem clearly yet.
I think there must be a caller and a callee (called function) when we
talking about passing arguments. That is to say, you write in your
main program:
...
echo calc($rs).br;
...
and make sure there is a function named calc:
function calc($rightsid){
Never mind I got it figured out. Had to set a global variable to make it
visible.
Thanks anyway
-Will
Forest Liu [EMAIL PROTECTED] kirjoitti
viestissä:[EMAIL PROTECTED]
I donot understand your problem clearly yet.
I think there must be a caller and a callee (called function) when we
talking
-Original Message-
From: William Stokes
Sent: 18/03/05 07:33
Hello,
Just simple question (I think?)
How to pass return value from function to the main program?
Here's example:
do some code in funtion to set the $res value:
} elseif ($rightsid == $oik6) {
$res = ok;
No...I think it is not a proper way to program.If you have programming
experiences with any other language, you'll understand this
naturally.
The original purpose of making a function is tell it some arguments,
and you get a result. It should have the fewest relationship with the
environment
Hello,
Just simple question (I think?)
How to pass return value from function to the main program?
Here's example:
do some code in funtion to set the $res value:
} elseif ($rightsid == $oik6) {
$res = ok;
return $res;
} elseif ($rightsid == $oik7) {
$res = notok;
return $res;
}
How
5 matches
Mail list logo