Re: in php i like to retrieve $_post values using index like 0,1,2.....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Even if you do want to associate the values and the keys, you can use
the foreach construct.

Just do

foreach ($array as $key=>$value) 
{
...
}

Dave

--- In php-objects@xxxxxxxxxxxxxxx, Nebu Pookins <nebu@xxxx> wrote:
> Cold Fusion wrote:
> 
> >how can i retrieve posted form control values without using control
name
> >i dont want to use $_POST["fieldname"] rather  
> >i like to retrieve $_post values using index like 0,1,2.....
> >  
> >
>     Without a name, you won't know which value is associated with which 
> key. For example, if you receive the string "Foo", was that the user's 
> name or his password? But if you really don't care about associating
the 
> values with the keys, you might want to use a foreach construct.
> 
> foreach ($POST as $value) {
>   echo $value;
> }
> 
>     - Nebu





PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux