<?php
$array = array
(
"0" => array
(
"q_status" => "Closed",
"q_is_refunded" => "No",
"qb_bid_status" => "2",
"u_user_type" => "Tutor",
"total_tutor" => "1",
"target_date" => "0000-00-00 00:00:00",
"bid_price" => "50.00",
"users_id" => "3",
"profile_image" => "http://localhost/studygate/WS/image_resize/?pic=aHR0cDovL2xvY2FsaG9zdC9zdHVkeWdhdGUvcHVibGljL2ltYWdlcy9ub2ltYWdlLmdpZg==&height=110&width=110&color=FFFFFF",
"first_name" => "Carlene",
"last_name" => "Poblete",
"added_date" => "2016-10-25 11:20:00",
"question_id" => "1"
),
"1" => array
(
"q_status" => "Closed",
"q_is_refunded" => "No",
"qb_bid_status" => "2",
"u_user_type" => "Tutor",
"total_tutor" => "1",
"target_date" => "0000-00-00 00:00:00",
"bid_price" => "80.00",
"users_id" => "12",
"profile_image" => "http://localhost/studygate/WS/age_resize/?pic=aHR0cDovL2xvY2FsaG9zdC9zdHVkeWdhdGUv",
"first_name" => "George",
"last_name" => "Henry",
"added_date" => "2016-10-24 20:24:30",
"question_id" => "2"
)
);
//$arr = array_filter($array,function($v,$k){return $v['bid_price'] > 15;});
$arr = array_filter($array, function($v, $k) {
return $v['bid_price'] > 60;
},ARRAY_FILTER_USE_BOTH);
sort($arr);
print_r($arr);
- Output for 5.6.0 - 5.6.27, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- Array
(
[0] => Array
(
[q_status] => Closed
[q_is_refunded] => No
[qb_bid_status] => 2
[u_user_type] => Tutor
[total_tutor] => 1
[target_date] => 0000-00-00 00:00:00
[bid_price] => 80.00
[users_id] => 12
[profile_image] => http://localhost/studygate/WS/age_resize/?pic=aHR0cDovL2xvY2FsaG9zdC9zdHVkeWdhdGUv
[first_name] => George
[last_name] => Henry
[added_date] => 2016-10-24 20:24:30
[question_id] => 2
)
)
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Array
(
[0] => Array
(
[q_status] => Closed
[q_is_refunded] => No
[qb_bid_status] => 2
[u_user_type] => Tutor
[total_tutor] => 1
[target_date] => 0000-00-00 00:00:00
[bid_price] => 80.00
[users_id] => 12
[profile_image] => http://localhost/studygate/WS/age_resize/?pic=aHR0cDovL2xvY2FsaG9zdC9zdHVkeWdhdGUv
[first_name] => George
[last_name] => Henry
[added_date] => 2016-10-24 20:24:30
[question_id] => 2
)
)
preferences:
177.83 ms | 403 KiB | 186 Q