including value of key in another assoc array, possible ?
| From: | Peter J. Schoenster | Date: | Mon, 09 Sep 2002 19:02:14 +0000 |
| Subject: | including value of key in another assoc array, possible ? | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-265@lists.php.net to get a copy of this message | ||
Hi,
I'm getting details about a table in mysql. I then auto generate a form which
represents that table. I want to be able to enter data, click submit and then
return to the same form if validation on the input fails. To do this I need to
dynamically insert the value as I do for everything else as such (the way I'm
thinking)
(NOTE, I only have one row as such:
<td width="20%">{$dbrow.name} </td><td><input type="text"
name="{$dbrow.name}" size="{$dbrow.size}"
maxlength="{$dbrow.size}"></td></tr>
)
value={$input.{$dbrow.name}}
$input is an assoc array of the last inpu and $dbrow.name has the key for
$input ... how can I dynamically do the above?
Thanks,
Peter