i have an array that looks like this, I want to search for a saleref and get it to give me the key in PHP, i've tried using array_search but i get nothing back. Alternatively i just want to display the other values in the same array as the salesref searched if there's a better way.
Array
(
[xml] => Array
(
[sale] => Array
(
[0] => Array
(
[saleref] => 305531
[saleline] => 1
[date] =>
[team] => WH
[manifest] => 0
[qty] => 1
[order_status] =>
)
[141] => Array
(
[saleref] => 306062
[saleline] => 1
[date] =>
[team] =>
[manifest] => 0
[qty] => 1
[order_status] => RECEIVED
)
[1] => Array
(
[saleref] => 306062
[saleline] => 2
[date] =>
[team] => WH
[manifest] => 0
[qty] => 1
[order_status] =>
)