Re: [PHP] passing return value from fucntion

2005-03-18 Thread Forest Liu
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){

Re: [PHP] passing return value from fucntion

2005-03-18 Thread William Stokes
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

RE: [PHP] passing return value from fucntion

2005-03-18 Thread Ford, Mike
-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;

Re: [PHP] passing return value from fucntion

2005-03-18 Thread Forest Liu
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

[PHP] passing return value from fucntion

2005-03-17 Thread William Stokes
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