|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-03-20 14:56 UTC] echoz at k-designs dot com dot sg
<?php
switch ($e) {
case "list";
// do this
break;
case "add";
// do that
break;
}
?>
everytime i call the script without the varible "e" specified... they will return "Warning: Undefined variable: e in e:somewheresomehow on line 14"
please help.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 09:00:01 2025 UTC |
because you are using $e in the switch statement although it has never been given a value before if this annoies you turn of E_NOTICE warning level or wrap your switch into if(isset($e)) { ... }