hey people,
Im having a bit of trouble with the explode function or it could be the file_get_contents function, im a bit confused.
I have this code to explode a php file by ~ :
$filename = file_get_contents('content.php');
$entry_array = explode("~", $filename);
echo $entry_array[1];
echo $entry_array[2];
echo $entry_array[3];
echo $entry_array[4];
echo $entry_array[5];
it then echos 5 of the entries.
In these entries taken from content.php is the following php:
<a href="?comments=ID2ndAugust121410#ID2ndAugust121410">comments</a>
<?php
if ($_GET["comments"] == "ID2ndAugust121410") {
include ("comments/ID2ndAugust121410form.php");
}
else {}
?>
A link which should once clicked, include another php file, on the page that has exploded the contents.php file
Hope this is making sense...
My problem is that the php included in the exploded entries is not running when the link is clicked, i know theres nothing wrong with the php included in the entries as it works on its own. it is only when i explode to display only 5 entries that I get the problem.
Any ideas on how i could fix this?
Thanks.