Re: Using a variable to call another variable
| From: | tedd | Date: | Sat, 09 Sep 2006 20:05:51 +0000 |
| Subject: | Re: Using a variable to call another variable | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241546@lists.php.net to get a copy of this message | ||
At 11:19 AM -0400 9/9/06, Robert Cummings wrote:
Rob: If you ever wrote an exam that said at the end of a question -- "Or something like that." -- then you would have gotten an answer like mine. I've been dodging teachers longer than you've been one. :-) tedd PS: Few things are harder to put up with than the annoyance of a good example. -- ------- http://sperling.com http://ancientstones.com http://earthstones.comOr something like that. <---- :-) $easy_peasyier = array("foo1" => 1, "foo2" => 2, "foo3" => 3); echo($easy_peasyier['foo1']);That's zero marks on any exam I ever wrote. You didn't properly read the business requirements that specified the need for a function ;) Also, the version you showed isn't shared in any way, it has local scope, so unless it's defined in global scope and you're working in global scope (since I don't see a global declaration) then it's not very accessible :)) Cheers, Rob.