Re: Using a variable to call another variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 11:19 AM -0400 9/9/06, Robert Cummings wrote:

 > >  Or 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.

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.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux