Date: 07/26/02
- Next message: Justin French: "Re: [PHP] Possible to have optional values in function?"
- Previous message: Jason Wong: "Re: [PHP] Possible to have optional values in function?"
- Maybe in reply to: Alexander Ross: "[PHP] (newbie) questions abot vars and args"
- Next in thread: Justin French: "Re: [PHP] (newbie) questions abot vars and args"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>> 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-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Justin French: "Re: [PHP] Possible to have optional values in function?"
- Previous message: Jason Wong: "Re: [PHP] Possible to have optional values in function?"
- Maybe in reply to: Alexander Ross: "[PHP] (newbie) questions abot vars and args"
- Next in thread: Justin French: "Re: [PHP] (newbie) questions abot vars and args"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

