You are here: Help width news script needed « All PHP « IT news, forums, messages
Help width news script needed

Posted by Dalibor on 02/18/06 02:00

I wrote some code for displaying news on my website.
Code goes like this:
<?
$newsfile = 'news.txt';
echo "<B>TRENUTNE VIJESTI</B><br>\n";
$data = file($newsfile);
$data = array_reverse($data);
echo "<span style=\"normal 11 Verdana; color:#fff; text-align:justify;\">";
foreach($data as $element) {
$element = trim($element);
$pieces = explode("|", $element);
echo $pieces[2] . "<BR>" . "<span style=\"font:normal 11px
Tahoma\"><u>Published</u>: " . $pieces[1] . " " . $pieces[0] .
"</span></span><BR><br>";
}
?>
I have form that puts content in flat file.

Messages are writen in flat file in format like this:
21.Feb 2006.|Dalibor|Some message text
14.Feb 2006.|Dalibor|Other message text...

I need piece of code for displaying last 5 messages and for deleting
certain messages.
Can you help me? Thanks!
--
..:Dalibor:.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация