> I'm migrating to PHP from ColdFusion.
> 
> I've been running some sample scripts I have found in various places
and
> all
> of them throw an error:
> 
> Notice: Undefined variable: <varname> in
> c:\inetpub\wwwroot\myphpcalendar\<somefile.php> on line <someline>.
> 
> In ColdFusion, I can use the <cfparam> tag to preset a variable. I've
> tried
> the following code to define the variable in PHP, but it doesn't work:
> 
> if (!isset($VarName)) {
>     $VarName = 0;
> }

How does that "not work?" It should, as long as you're including the
line before the others that are giving you the notice.

You can also turn down your error_reporting setting in php.ini. You can
turn off notices and just see warnings. There is an example within
php.ini.

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to