Re: Extracting values from an array (I think)
| From: | John W. Holmes | Date: | Tue, 25 Nov 2003 02:56:52 +0000 |
| Subject: | Re: Extracting values from an array (I think) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31732@lists.php.net to get a copy of this message | ||
dpgirago@mdanderson.org wrote:
But the variable variable thing does not seem to be working, either with or without the $ for the 'counter' inside the brackets.${'sLabel_' . $count} = $row['short_label']; Any reason you're not just doing $data[] = $row['short_label']; and loop through that? or $data['sLabel_' . $count] = $row['short_label']; "variable variables" are just a poor man's array... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com${$sLabel_ . $counter} = $row['short_label']; $counter++;