But I mean the following:
In the main page I include data.txt. data.txt looks like this:
<php?
$title = "Title of this category";
$content = "Text for this category";
?>
In the main-page I use these 2 variables and I display them. Now I would like to add a piece of php-script in the content (the random text script from yesterday). I'd like to know whether I can put this script inside the $category in the data.txt? So is the following valid?
<php?
$title = "Title of this category";
$content = "Text for this category
//put the text into an array
$text_array = explode ("*******", $your_text_file);
//randomize the array
shuffle ($text_array);
//display one of them
echo "$text_array";
// if you want to display all of them randomly
for($arrayLoop=0;$arrayLoop <= count($text_array);$arrayLoop++){
echo "$text_array[$arrayLoop]";
}
";
?>
Here I've just put the script inside the $content in the data.txt.
Thanx, Michiel