Use array_filter:
$filtered = array_filter($yourArray, function($element) use($test_pack_id) {
return $element['test_pack_id'] == $test_pack_id;
});
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Course Queries 4 Answers
manpreet
Best Answer
2 years ago
My question may sound confusing to some people. But in fact it's a quite simple one. Let me clear you the scenario. I've an array titled
$test_result_data
as follows: