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
$tblcategory = 'cat_code,cat_description,
$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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
also is there way to skip a value from reading?