How to get next value from match value in loop? I need '1010-1040' key in array.
<?php
$arr = Array
(
'0900-0930' => 0,
'0935-1005' => 0,
'1010-1040' => 0,
'1045-1115' => 0
);
$matchVal = '0935-1005';
foreach ($arr as $key => $value) {
if($matchVal == $key){
echo $key.'<br />';
}
echo next($arr);
}
?>