php-general | 2001032
Date: 03/27/01
- Next message: Chris Worth: "[PHP] data entry validation"
- Previous message: FredrikAT: "Re: [PHP] $myfile[$count]_type?!"
- In reply to: FredrikAT: "Re: [PHP] $myfile[$count]_type?!"
- Next in thread: Jason Lotito: "[PHP] Array in Form Elements"
- Reply: Jason Lotito: "[PHP] Array in Form Elements"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Try this example :
<?php
$array = array('a','b','c');
$index = 1;
${$array[$index] . '_type'} = 'foo';
print $b_type; // prints foo
?>
Regards,
Philip
On Wed, 28 Mar 2001, FredrikAT wrote:
> Hi, again!
>
> Didn't work...
>
> This is the scene: (file.php?a=input)
> <input type=\"file\" name=\"myfile[$count]">
>
> (file.php?a=reg)
> Trying to echo type...
> ${$myfile[$count] . '_type'} // NOT WORKIN'
> ${$myfile$count}_type // NOT WORKIN'
>
> Any suggestions?
>
> Fredrik A. Takle
> Bergen, Norway
>
>
>
> ""FredrikAT"" <ftakle <email protected>> skrev i melding
> news:99qqqo$v1c$1 <email protected>
> > Why can't I do $myfile[$count]_type?!
> > What schould I do instead?
> >
> > ---------------------------------
> > Fredrik A. Takle
> > fredrik <email protected>
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> > For additional commands, e-mail: php-general-help <email protected>
> > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Chris Worth: "[PHP] data entry validation"
- Previous message: FredrikAT: "Re: [PHP] $myfile[$count]_type?!"
- In reply to: FredrikAT: "Re: [PHP] $myfile[$count]_type?!"
- Next in thread: Jason Lotito: "[PHP] Array in Form Elements"
- Reply: Jason Lotito: "[PHP] Array in Form Elements"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

