Variable name as a string
| From: | ioannes | Date: | Wed, 27 Aug 2008 14:00:56 +0000 |
| Subject: | Variable name as a string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-278770@lists.php.net to get a copy of this message | ||
Could someone tell me how to get the name of a variable as a string. This would be useful in form submission with multiple check-boxes to match against database records. At the moment I use ${"var".$ID[$x]} or someting like that to go through all the possible matches, but it would be quicker to explode the name of a checkbox like a string like cb_1 to match to record 1 etc.
There is some reason I do not use the value of the check box, but I can't remember it now!
John