Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Sharl.Jimh.Tsin
BTW,why my previous post was rejected by the mail server as spam?

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Sharl.Jimh.Tsin
all right,Richard.i pretty agree with you and always think that NOT 'many' but ALL languages should have Variety Scope. And i do not want access the ALL variety in any function/page,as you said, that's poor design. I just feel a bit surprise that the function can not access the variety which loca

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Daniel Brown
On Tue, Aug 2, 2011 at 10:24, Richard Quadling wrote: > > For many many languages, scope is essential. PHP has had scope since > day 1 (OK, I'm pretty sure PHP has had scope since day 1). Depending on which generation/incarnation of PHP you mean, you're correct. Forms Interpreter (PHP/FI and

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Richard Quadling
On 2 August 2011 13:45, Sharl.Jimh.Tsin wrote: > 在 2011-08-02二的 13:33 +0100,Richard Quadling写道: > >> It is to do with variable scope. >> >> http://uk.php.net/manual/en/language.variables.scope.php / >> http://uk.php.net/manual/zh/language.variables.scope.php >> > > Thanks for your useful URL.Accor

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Sharl.Jimh.Tsin
在 2011-08-02二的 13:33 +0100,Richard Quadling写道: > It is to do with variable scope. > > http://uk.php.net/manual/en/language.variables.scope.php / > http://uk.php.net/manual/zh/language.variables.scope.php > Thanks for your useful URL.According to the doc,i must make the var global by using "$GLO

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Richard Quadling
On 2 August 2011 13:24, Sharl.Jimh.Tsin wrote: > 在 2011-08-02二的 22:29 +1200,Simon J Welsh写道: > >> You're using $motoCols in your function, but have not defined it or passed >> it as an argument. >> --- >> Simon Welsh >> Admin of http://simon.geek.nz/ >> > > YES,thanks for taking me out.and i just

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Sharl.Jimh.Tsin
在 2011-08-02二的 22:29 +1200,Simon J Welsh写道: > You're using $motoCols in your function, but have not defined it or passed it > as an argument. > --- > Simon Welsh > Admin of http://simon.geek.nz/ > YES,thanks for taking me out.and i just have a question that the variety $motoCols has been define

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Simon J Welsh
On 2/08/2011, at 10:24 PM, Sharl.Jimh.Tsin wrote: > hi,everyone > it is a very strange problem,At first,i put my code into the method > inner,it works.see below: > > [snip] > > As you can see,it seems to be impossible.Can someone tell me WHY? > > -- > Best regards, > Sharl.Jimh.Tsin (Fro