How to extract data from HTTP_GET_VARS ?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Sat Feb 15, 2003 5:03 am

you'd need to compile an array from the returns - either through building arrays usign the passed names or by instigating a new dual array pair

eg -

foreach($_POST as $var=>$val)
{
$var_array[] = $var;
$val_array[] = $val;
}

echo $var_array[3] .' == '. $val_array[3];

or just count the length of one passed array and iterate through the indices using an incrmental operand.

$max_of = count($itemid);
$ray_cnt = -1;
while(++$ray_cnt < $max_of)
{
echo $_POST['itemid[$ray_cnt]'] .' == '. $_POST['new_qty[$ray_cnt]'] .'<br />';

Return to “PHP coding => General”

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest