Posted by Old Caledonia on 09/27/07 20:34
Hi,
I'm in the process of upgrading an aged php application to php5
compatibility.
One script has me stumped. Here's a code snippet:
while($categoryrow = mysql_fetch_array($categoryresult)) {
$categoryval = $categoryrow["category"];
$categoryidval = $categoryrow["categoryid"];
$tempbox = "box" . $categoryidval;
//assign dynamic variable
$categoryvalue = ${$tempbox};
// end code snippet.
If I echo $tempbox, I get a list of numerical values (correctly).
If I echo $categoryvalue, my data is empty.
If it's not a PHP5 thing then I'm lost - any ideas/suggestions?
Neil
[Back to original message]
|