Re: PHP saying I have an undefined variable?



Note that this is not an error but a notice - there's a difference. Errors
will stop execution of your script, while warnings and notices are there to
inform you of possible faulty code. Depending on your error_reporting
setting in php.ini, you may or may not see warnings and notices. Your script
has an undefined variable on your server but your server is just not telling
you, because error_reporting is set to off or warn (not all).

It is likely that you are using $end_while in a conditional statement before
you have defined it, leading to the notice. You should set it to a default
value at the beginning of your script, or before you use it.

ECRIA
http://www.ecria.com


.



Relevant Pages

  • Re: SSH login automation, get stuck at the last step.
    ... filename.txt" to the server. ... But the execution of the script stops ... The "run batch filename.txt" should automatically be sent to the ... why and what's the problem with my Expect script. ...
    (comp.lang.tcl)
  • Re: A script to flag commonly misused words
    ... is preferable in general as it allows you to scope warnings. ... use strict; ... I first wrote a script to extract the words to flag from your ... I discovered that at least one of the expressions you ...
    (comp.lang.perl.misc)
  • Re: [PATCH] Speed up "make headers_*"
    ... 'use strict' and 'use warnings' is recommended. ... The parentheses are not needed for most of the built-in functions. ... More or less the same comments would apply to the next script as well. ...
    (Linux-Kernel)
  • Re: crisis Perl
    ... As to writing good code to begin with, ... the top of the script. ... the "use warnings;" line won't actually change ... recommended declaring variables IN AS SMALL AS SCOPE AS POSSIBLE. ...
    (comp.lang.perl.misc)
  • Re: runat="server" functions execute, but variables dont exist - ASP
    ... I am very keen to include parts of the prototype library on the server ... write html to the page before it's sent to the client, ... Execution order of .asp files is not that obvious - particularly ... script executes), so either in the HTML body or within a <script ...
    (comp.lang.javascript)