I am trying to get the date from a <time>
tag
$explode = explode( '<time class="abs">', file_get_contents($url))[1];
$get_date = explode("</time>" , $explode);
echo date_format(date_create($get_date[0]),"Y/m/d");
The echo shows the date but there is also an error
Notice: Undefined offset: 1
When I do a var_dump, it shows that there is nothing in the array but then why does it echo the correct date..?