Re: should I be looking to eliminate all notices?

From: Date: Wed, 25 Apr 2007 02:09:20 +0000
Subject: Re: should I be looking to eliminate all notices?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-253649@lists.php.net to get a copy of this message
On Mon, April 23, 2007 2:56 pm, Justin Frim wrote: > Now that's a stupid example, but, you get the idea. Well, we agree that it's a stupid example... :-) :-) :-) <?php $formfield = isset($_GET['formfield']) ? $_GET['formfield'] : ''; // VALIDATE $formfield here!!! // be as strict as you can possibly be!! $funcresults = myfunction($formfield); function myfunction($formfield){ global $myarray; //ugh! echo "foo"; if (isset($myarray[$formfield])) return $myarray[$formfield]; return false; } function yourfunction($formfield){ global $yourarray; //ugh! echo "bar"; $sub = subfunction($formfield); if (isset($yourarray[$sub])) return $yourarray[$formfield]; return false; } //I dunno what you expect subfunction to be, as you never defined it... I think I got all your code in, though it's hard to tell with the mish-mash you made of it with comments... And I don't really understand at all what you thought was going on, but your comments and the code you wrote didn't seem to match up to me... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#253649) next »