try this updated version, I am guessing what you want as you didn't clearly explain what your aim behind your code is.
$url = 'link.html'
$html = file_get_html($url);
//$dayArray = array('28th Apr 2014', '29th Apr 2014' , '30th Apr 2014' ,'1st May 2014');
$monthNameArray = array('April', 'May');
$month_links = array();
foreach($monthNameArray as $month_name){
//$dayArrayvalue=strtotime($value);
//$month_name=date("F",$dayArrayvalue);
foreach($html->find('table',1)->find('a') as $elm) {
if(strcasecmp($elm->plaintext,$month_name)==0){
array_push($month_links, $elm->href);
}
//else{
//this will add a 0 to the array if there is no match. I don't think this is what you want, so just remove it if not needed
// array_push($month_links, '0');
// }
}
}
print_r( $month_links);