NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP Dynamic GET Variables , Do they exist?

CED consult at covenantedesign.com
Fri Apr 30 19:24:33 EDT 2010


<?php
//GIVEN a page that is called with:
//    $_GET['abc'] = 'def';
//CODED with:
    $dynamic_vars['a']['b'] = 'abc';

    // NO WORKY
    echo $_GET[ $dynamic_vars['a']['b'] ] ;

    // NO WORKY

    if(isset($_GET[ $dynamic_vars['a']['b'] ])){
       echo $_GET[ $dynamic_vars['a']['b'] ] ;
    }
?>

What am I doing wrong?
(this is obviously for demonstration purposes only, the actually 
variables have need for being stored in the manner that they are)

-Ed




More information about the talk mailing list