Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001032

Re: [PHP] $myfile[$count]_type?! From: Philip Olson (philip <email protected>)
Date: 03/27/01

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>