Hey, im quite new to php so basically i need a little help from anyone..?
im trying to write the read out of a php function to a txt file.
this is the code i have:
<?php
$myFile = "latest.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$content = "content=\r";
fwrite($fh, $content);
include ("GetLatestMessage.php");
echo "<font face=\"verdana\" size=\"1\"><b>Latest Posts:</b></font><br>";
$LastMsg=GetLatestMessage('n3w.net/the/maplelodge/maplelodgeforum','/users/n3w/public_html/the/maplelodge/maplelodgeforum',5);
for ($i=0;$i<=4;$i++){
echo "<a href=\"http://",$LastMsg['URL'][$i],"\" target=\"NEU\"><font face=\"verdana\" size=\"1\">",$LastMsg['subj'][$i],"</a> <br>by ",$LastMsg['auth'][$i],"</font><br><br>";
}
fwrite($fh, $LastMsg);
fclose($fh)
?>
The part i want to write to the file is the $LastMsg but when i try it, i get this is the txt file:
content=
Array
i wanna keep the content= there so ignore that, its just the Array bit i dont get...
hope someone can help.