Link to home
Start Free TrialLog in
Avatar of 3xtr3m3d
3xtr3m3d

asked on

php array help

Hi

$tblcategory = 'cat_code,cat_description,user,stamp,ip';  //table field order
$expectedFields = 'id,cat_description'; //form fields

$tblorder = explode(',', $tblcategory);
$expectedorder = explode(',', $expectedFields);

im reading values like below

foreach ($tblorder as $data){            
            $result[$data]= $_GET[$data];      
}

im getting primary key always as id and but primary key of this table is cat_code

so how to read id value as cat_code and assign that to result array?


hope someone will understand what i meant

Thanks



ASKER CERTIFIED SOLUTION
Avatar of Rik-Legger
Rik-Legger
Flag of undefined image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 3xtr3m3d
3xtr3m3d

ASKER

Thanks a lot.

also is there way to skip a value from reading?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial