Jump to content

Maartin

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Maartin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is the code in the picture: <?php // PHP 5.3.13 // $a = array(); // Error // $a = array('test' => 'q'); // OK no Notice if($a['test'] != 'b') echo "hello"; ?> Thanks for telling me: "The code you have showed us will not produce the error you have shown us. Fix your code. If you can't, post the problematic code. Turning error reporting off because you have errors is the sign of a poor programmer." but you wrong thorpe the code generate this Notice even if you like insult me!
  2. if($a['test'] == 'b') if test is unset I get a Notice like this: Notice: Use of undefined constant test - assumed 'test' in K:\www\a.php on line 7 if I turn off display_errors = Off in php.in the page run FINE with ignorant bliss of all the notices! I continue change all the [name] to ['name'] and is thankful for my new wisdom! My wish was to show only ERRORS not all Notices!
  3. I been $a['name'] the whole day now... I try use display_errors = On in php.in I still get: Notice: Undefined index: a in ... if($a['test'] == "b") ...; // when !isset($a['test']) I get the Notice!; Can I remove Notice when php.ini: display_errors = On
  4. thanks! It look like I am forced to $a['test'] can I unforce it so I only need to write $a[test] somewhere in php.ini?
  5. <?php $a = array(); // My Error message: // Notice: Use of undefined constant test - assumed 'test' in K:\www\a.php on line 7 $a[test] = 1; echo $a[test]; ?> // ------------------------------------------------------------ I got php 5.313 $a[test] = 1; // I can't add $a[test] in array anymore! Why this stop working and how can I make php add more array elements? thanks /Martin PS: This code work on my Webhotel that use same PHP 5.3.13 My question is why dosen't it work in my WAMP Installation?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.