I see that your array is multidimensional and you are starting a loop at the second index, so for example
for($m=0; $m<count($data['data']); $m++){
This will consider the length of the array (if any) with the name datainside the variable $data.
And change your $ i to $ m (if you are trying to traverse this array in a loop) like
if(date("m-Y",strtotime($data['data'][$m]['date_d'])) == $curdate)
source
share