I'm using the Simple HTML DOM Parser to retrieve a specific div from a website. I remove the part of the div that I don't want by using explode(). I then want to explode the kept part into a new array, but for some reason it doesn't get indexed as intended.
Why doesn't my last row with "echo $content[0];" print "Overall" while "echo $content[5];" does, when Overall is the first string? How do I fix this?
<?php
include_once('simple_html_dom.php');
$html = file_get_html('http://services.runescape.com/m=hiscore_oldschool/hiscorepersonal.ws?user1=Pur');
$content = $html->find('div[id=contentHiscores]', 0)->plaintext;
echo $content;
echo "<br><br><br><br>";
$content = explode("SkillRankLevelXP", $content);
$content = $content[1];
echo $content;
echo "<br><br><br><br>";
$content = explode(" ", $content);
echo $content[0];
?>