Peter Houchin wrote:

> what about if you assign the key to = the id (if in a data base)?
> 
> maybe like
> 
> while (list ($key, $val) = each ($id)) { 
>  if ( $key != "Submit" )  {
> 
>>    array_push($input, $val);
>>    }
>> 
>> }
> 
I am not using a database for this part as I am just collecting the data 
to validate. I really want to know how to create a new array in a while 
loop, which contains the key and value pairs of the array passed to 
each. So lets say the above code would output:

0 => value1
1 => value2
2 => value 3
4 = value4

But I want to create:

keyname1 => value1
keyname2 => value2
keyname3 => value3
keyname4 => value4

Does anyone understand what I am on about?

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to