NYCPHP Meetup

NYPHP.org

[nycphp-talk] Output name of Variable

Chris Shiflett shiflett at php.net
Mon Feb 10 13:44:48 EST 2003


--- Jim Musil <jim at nettmedia.com> wrote:
> bug($number_of_rows);
> 
> And I wanted to have my output be
> 
> $number_of_rows: 5


function bug($var_name)
{
   echo '$' . $var_name . ': ';
   echo '<pre>';
   print_r($$var_name);
   echo '</pre>';
}

bug('number_of_rows');

Chris



More information about the talk mailing list