Re: (newbie) questions abot vars and args

From: Date: Fri, 26 Jul 2002 15:44:00 +0000
Subject: Re: (newbie) questions abot vars and args
Groups: php.general 
Request: Send a blank email to php-general+get-109768@lists.php.net to get a copy of this message
1) To echo the variables name instead of it's value, surround it instead by single quotes, not double. echo '$var' OUTPUTS $var echo "$var" OUTPUTS the contents of $var 2) Checkout the func_get_args() function. http://www.php.net/manual/en/function.func-get-args.php HTH! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "Alexander Ross" <alexross@bleen.net> 07/26/02 11:40AM >>> 1) Given a variable how can I echo the var's name, not its value?? 2) Is there a way for PHP function to handle a dynamic number of arguments? In other words, I want to write a function that takes any number of arguments (strings) and echos each of them with a <br> appended to each of them. Thanks for your help everybody -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#109768) next »