How do I specify the location of a variable to be written to
Posted: Mon Jul 28, 2003 8:18 am
How do I specify the location of a variable to be written to:
my continuing and never ending search to prove you do not need SQL to build a decent forum continues....
I can now create new files ( writen to a directory ), write content to these files, write the file names to a list, and hyperlink from this list to the contents of these files....
now here is the problem.
I do not have a howI would go about formatting the contents of this newly created file.
ie
How do I read the $pieces variable into a location of my choosing.
I have been using <a name="target"></a> and appending #target to the end of the link, and I have been trying target="_self" but to no avail, only an unformatted new page opens up.
my continuing and never ending search to prove you do not need SQL to build a decent forum continues....
I can now create new files ( writen to a directory ), write content to these files, write the file names to a list, and hyperlink from this list to the contents of these files....
now here is the problem.
I do not have a howI would go about formatting the contents of this newly created file.
ie
Code: Select all
<?PHP
$data = file('list.dat');
$data = array_reverse($data);
foreach($data as $element) {
$element = trim($element);
$pieces = explode("|", $element);
echo "<a class='link3' href="http://www.distortedmedia.co.uk/test/test1/$pieces[1]">$pieces[1]</a>";
}
?>I have been using <a name="target"></a> and appending #target to the end of the link, and I have been trying target="_self" but to no avail, only an unformatted new page opens up.