Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #3621

missing variable

Date 2011-10-29 15:42 -0400
From bill <nobody@spamcop.net>
Newsgroups comp.lang.php
Subject missing variable
Message-ID <-4adnYXjVd2CyjHTnZ2dnUVZ_oudnZ2d@cablespeedmi.com> (permalink)

Show all headers | View raw


here is a tiny piece of my script:

$history = "empty appointment filled ";
echo  " history: $history\n";

when it executes I get a PHP Notice
PHP Notice:  Undefined variable: history in 
/var/www/MP2010-v2/classes/cSchedule.php on line 108

however if I use:
$history = "xxx";
echo  " history: $history\n";

it executes fine.

To say I am puzzled is a vast understatement.
Yes, I did cut an paste from the script,
No, I did not include the other  200 lines.
If I paste it into a test script, it runs fine so it is obviously 
in the other 200 lines.

If I rename the variable "hist" I get the same error

THis is running from the command line.

any thoughts ?

bill


Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

missing variable bill <nobody@spamcop.net> - 2011-10-29 15:42 -0400
  Re: missing variable Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2011-10-29 23:35 +0200
    Re: missing variable bill <nobody@spamcop.net> - 2011-10-30 08:59 -0400
      Re: missing variable Denis McMahon <denismfmcmahon@gmail.com> - 2011-10-30 19:57 +0000
        Re: missing variable Jerry Stuckle <jstucklex@attglobal.net> - 2011-10-30 19:29 -0400
          Re: missing variable Denis McMahon <denismfmcmahon@gmail.com> - 2011-10-31 00:37 +0000
        Re: missing variable bill <nobody@spamcop.net> - 2011-10-31 06:30 -0400

csiph-web