OK, so I'm trying to get some info into an array, and then print it to the screen. I have a file named dlist.php, which is what I'm reading into an array using file(). So I have the following code:
$d = file("dlist.php");
foreach($d as $key=>$val) {
$data[$key] = explode("||", $val);
}
print "$data[5][0]";
print "$data[5][1]";
The file is the following:
<?php if ($_SERVER['PHP_SELF'] == "dlist.php") {
header("Location: index.php");
}
?>
english||kurash
The output is the following:
[0][1]
Why won't it appear as the text in the file? Is it a problem because of the first 4 lines, if so, how do I make the foreach skip those?