NYCPHP Meetup

NYPHP.org

[nycphp-talk] $$ question

Tom Melendez tom at supertom.com
Wed May 25 16:38:43 EDT 2005


That $concerts2006 array is available in the function I presume, right? 
If it isn't, you won't get the value of it because it is not local. Just 
checking.

Other than that, I'm not sure. I've used the same, and it has worked for 
me in the past.

Thanks,

Tom
http://www.liphp.org


Michael Southwell wrote:

> I have a question about interpreting $$variable.
>
> I have this:
> $concerts2006 = array(
> array("January 28","Cypress Club - West Palm Beach, FL"),
> );
>
> and then I have this:
> function showSchedule( $year ) {
> ....
> $list = 'concerts' . $year; // this gets 'concerts2006' ok when called 
> with 2006
> $num = count( {$$list} ); // but this does not get count( $concerts2006 )
> ....
> <?php echo $$list[$i][0]; ?></td> // so of course this doesn't work
>
> So the problem is at $$list. It doesn't seem to matter whether I have
> {$$list} or just $$list.
>
> I also seem to remember from somewhere that the $$list[][] never works 
> but
> I couldn't find it in the docs.
>
> Help?? Thanks.
>
>
> Michael Southwell, Vice President for Education
> New York PHP
> http://nyphp.org/twoday - In-depth PHP Training Courses
>
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>




More information about the talk mailing list