i have two arrays which keys are book id( 61, 78 ,…etc)
(1) book_width
(
[61] => 8.3
[72] => 8286.1
[78] => 6.4
[100] => 8407.0
[102] => 0.7
)
(2) book_height
(
[61] => 9.00
[72] => 150
[78] => 8.00
[100] => 150
[102] => 3.00
)
now i want an array which contain those books id’s which their height is greater than or equal to their width
means i need an array mention below
(2) book_dimension
(
/*book id*/ [78] => 8.00 //along their height or width(anyone)
[102] => 3.00
)
or only book id in a new array
(2) book_dimension
(
[0] => 78
[1] => 102
)
I believe this should do it:
EDIT:
Oops: Comparing should be the other way around. (changed >= to < )
documentation: http://docs.php.net/array_uintersect_assoc