Re: 'dot' is only printing first element of array in HTML forms
| From: | Teodor Cimpoesu | Date: | Fri, 28 Jul 2000 16:10:46 +0000 |
| Subject: | Re: 'dot' is only printing first element of array in HTML forms | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8809@lists.php.net to get a copy of this message | ||
Hi darrellb!
On Fri, 28 Jul 2000, darrellb wrote:
> running PHP4.01, i have a print statement which prebuilds an HTML
> form...typical snippet is:
>
> .
> .
> .
> <td>Last Name</td><td align=left><input type=text name=givenname
> maxlength=25 value=" . $attrib[0]["givenname"][0] . "></td>
you can also use:
<td>Last Name</td><td align=left><input type=text name=givenname
maxlength=25 value='{$attrib[0][givenname][0]}'></td>
> in the above context i only get the first word in the prefilled form (in
> this case 'one')...
because you missed '' quoting for `value' attribute value.
-- teodor