i just started with my own news-script, and got kinda stuck on a little problem. as u can see here http://www.wavemasterz.nl/todaly/headline.php it works a little allready. But as u can see, the script makes a seperate link to view the whole article. Here is my problem, i dont want a seperate link, i want the headline itself to be the link.
U got any tips hints or whatever to help me out?
(its pretty basic, i know, just started with php)
the script i wrote:
<?php
include "db.php" ;
while($news = mysql_fetch_array($news_result)) {
// time transformation
$ts = $news['news_datetime'];
$unixtime = mktime(substr($ts, 11, 12), substr($ts, 14, 15), substr($ts, 17, 18), substr($ts, 5, 6), substr($ts, 8, 9), substr($ts, 0, 4));
?>
<table width="400" border="0" cellspacing="0" cellpadding="0" allign="center">
<tr>
<td>
<span class="kleiner"><?php echo date("j-n H:i", $unixtime) ?><?php echo " ";
// below is the line where the script now makes a seperate link
// i want this to be fixed 🙂
$news['news_header'] = substr($news['news_header'], 0, 180) . " ...<a href=news2.php?news_ID=" . $news['news_ID'] . ">read more</a>"; echo $news['news_header'] ?>
// this part above 😉
</span>
</td></tr></table>
<?php
}
mysql_close();
?>