I'm trying to format the news using a template... here's the code to show you want I'm trying to do.
Code: Select all
$fp = fopen("/home/empirega/public_html/xg/news/xgn.txt","w");
if($query) {
while ($data = mysql_fetch_assoc($query)) {
$subject = $data['subject'];
$author = $data['post_by'];
$body = $data['post_body'];
$date = date("l, F j Y \@ g:i a", $data['post_date']);
$news = "<? include('/home/empirega/public_html/xg/news/xgn_template.php'); ?>";
fputs($fp,$news,strlen($news));
fflush($fp);
}
fclose($fp);
}Thanks!