On 5/22/06, Jonas Rosling <[EMAIL PROTECTED]> wrote:
:-) Sorry! I've been digging with this for a while now so I don't think I
have the best code left. But this is what I have for the moment:
while($row=mysql_fetch_array($result)) {
if (!$$row[0]) {
$$row[0] = array();
$$row[0][$row[2]] = $row[1];
}
else {
$$row[0][$row[2]] = $row[1];
}
}
I've been trying with eval() a bit as well without any good result.
The above code will work properly if you surround the
dynamic variable names by curly brackets:
${$row[0]}[$row[2]] = $row[1];
Rabin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php