Direct Output
If you just need to output your array directly to the page, you could do something like this:
foreach($original_array['category_id'] as $key => $categoryid) {
$product = $original_array['product'][$key];
$category = $original_array['category'][$key];
echo "{$categoryid} , {$product} , {$category}\n";
}
This is pretty simple and only requires a single foreach loop. This is useful if you do not need to use this data multiple times in different places.
Formatted Array Output
If you may need to use this later in code, I would create a new array with the data in the loop above.
This is probably overkill if you don't ever need to access this data again.
$output = [];
foreach($original_array['category_id'] as $key => $categoryid) {
$product = $original_array['product'][$key];
$category = $original_array['category'][$key];
$output[] = ['category_id' => $categoryid, 'product' => $product, 'category' => $category];
}
This would make $output
be something like
Array
(
[0] => Array
(
[category_id] => 1
[product] => Apple
[category] => Fruit
)
[1] => Array
(
[category_id] => 2
[product] => Cow
[category] => Meat
)
)
Which, of course, is trivial to output in your required format.
foreach($output as $values) {
echo "{$values['categoryid']} , {$values['product']} , {$values['category']}";
}