Please can someone offer an idea.

I am trying to generate arrays to hold inputs to columns. Column
titles are input to a table as needed. They are read by the program
and placed across the page. Then an array goes under each column name
to collect the inputs to the various rows. Everything works except to
dynamically change the name of the array.

while($foo=mysql_fetch_array($mysql_result)){
print "<INPUT TYPE=text NAME=correspondingfoo[]>";}


I can't see how to change the name of the array on the fly. Or maybe their is a better way?
Still trying to grasp what you're doing, but I think what you need falls under the category of variable variables.

For instance:

${"this"} = "some value";

...is the same as...

$this = "some value";

...which is the same as...

$text = "this";
${$text} = "some value";

So dynamic arrays could be generated simply by...

${$name} = array(".....


http://www.php.net/manual/en/language.variables.variable.php

Might help too...

--
Kyle Gibson
admin(at)frozenonline.com
http://www.frozenonline.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to