I'm trying to sort other website content from http://hiscore.runescape.com/index_lite.ws?player=cbb
What i wanna to is sort this conntent so every space would be in new line.
2981,2488,526626378
32300,99,21389751
804,99,63941429
39544,99,21603086
Also would be nice to get them in to table (4 rows, 3 colums).
But then again im stuck at exploding the lines, i have tried some exploding ways but none of them works for me

1) print_r (explode(" ",$data));
2)$data = explode(",",$data);
3) $data = explode("\n",$data);
4) $array = explode(",", $data);
5) $data = explode(",", $data);
echo $data[0];
echo $data[1];
6) $data = explode("\n", $data);
$data = explode(',', $data[0]); {
echo $newline . '<br />';
7) $data = explode(" ",$data);
$array = explode(" ", $data);My current code is like this:
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
</head>
<body>
<?php
$data = file_get_contents('http://hiscore.runescape.com/index_lite.ws?player=nfsmw142');
echo $data;
$data = explode(" ",$data);
?>
</body>
</html>


