i try to make read more option for my work and i create this code :
<?php
$string=$polnews['articale'];
if (strlen($string) > 500) {
// truncate string
$stringCut = substr($string, 0, 500);
// make sure it ends in a word so assassinate doesn't become ass...
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).'... <a href="view_articles.php?aid=$polnews[aid]">Read More</a>';
}
echo $string;?>
but the link not working.
The problem is you cannot interpolate variables inside single quoted strings.