<?php $arr = array ( 0 => array ( 'rating_id' => 'rwp_rating_5b4da83f6b281', 'rating_post_id' => 343, 'rating_review_id' => '0', 'rating_score' => array ( 0 => 2.0, 1 => 2.0, 2 => 3.5, ), 'rating_user_id' => 0, 'rating_user_name' => 'Joep van Dongen', 'rating_user_email' => 'dongen.van.joep@gmail.com', 'rating_title' => 'Dit is een test beoordeling', 'rating_comment' => 'Dit is een test beoordeling', 'rating_images' => array ( ), 'rating_date' => 1531815999, 'rating_status' => 'published', 'rating_verified' => false, 'rating_template' => 'rwp_template_5b16a33aa16b7', 'rating_privacy' => array ( ), ), 1 => array ( 'rating_id' => 'rwp_rating_5bd0271605392', 'rating_post_id' => 343, 'rating_review_id' => '0', 'rating_score' => array ( 0 => 5.0, 1 => 5.0, 2 => 5.0, ), 'rating_user_id' => 4, 'rating_user_name' => '', 'rating_user_email' => '', 'rating_title' => 'Harry de Vries', 'rating_comment' => 'Dit is een testreview om te kijken of et werkrty', 'rating_images' => array ( ), 'rating_date' => 1540368150, 'rating_status' => 'published', 'rating_verified' => false, 'rating_template' => 'rwp_template_5b16a33aa16b7', 'rating_privacy' => array ( 't5bab7c0abed1f' => 'true', ), ), ); $new = array_intersect_key($arr,array_intersect(array_column($arr, 'rating_post_id'), [343])); Var_dump($new); Echo count($new);
You have javascript disabled. You will not be able to edit any code.