Re: undefined variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 Feb 2014, at 12:25, Tim Streater <tim@xxxxxxxxxxxxxxxx> wrote:

> and then later I do:
> 
>  $str = "fcc: " . $PTR_fcc;
> 
> Now, upon examination it appears that I have an instance where $str ends up as:
> 
>  fcc: undefined
> 
> 
> My question is, under what conditions can a variable be set by the PHP system to the string "undefined"? Would this require that my ajax call in the browser would have to have had something explicit like:
> 
>  ... &PTR_fcc=undefined …

Not explicit as such, but that is what’s happening. Javascript will use the string "undefined" whenever an undefined variable is concatenated on to a string.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

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






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux