Hi
I am using a function
==============================================
<?php
function nicetrim ($s) {
$MAX_LENGTH = 250;
$Str = html_entity_decode($s);
if (strlen($Str) <= $MAX_LENGTH) {
return $s;
}
$s2 = substr($Str, 0, $MAX_LENGTH - 3);
$s2 .= "...More";
return htmlentities($s2);
}
?>
=================================================
what it does is basically trims all but 250 characters
from a string varible and adds ...More to the end of it ,so in my html its called like this
<td><div align="left">'.nicetrim ($description).'</div></td>
Im having a problem because I need to make the
$s2 .= "...More"; part of the function a different colored font from the rest of the $description and have an <a href around it so that when the user clicks on ...More they are linked to another page. It should be pretty trivial but all that ive tried Im not getting the desired outcome would some one please show me the way .
Thanks again
I am using a function
==============================================
<?php
function nicetrim ($s) {
$MAX_LENGTH = 250;
$Str = html_entity_decode($s);
if (strlen($Str) <= $MAX_LENGTH) {
return $s;
}
$s2 = substr($Str, 0, $MAX_LENGTH - 3);
$s2 .= "...More";
return htmlentities($s2);
}
?>
=================================================
what it does is basically trims all but 250 characters
from a string varible and adds ...More to the end of it ,so in my html its called like this
<td><div align="left">'.nicetrim ($description).'</div></td>
Im having a problem because I need to make the
$s2 .= "...More"; part of the function a different colored font from the rest of the $description and have an <a href around it so that when the user clicks on ...More they are linked to another page. It should be pretty trivial but all that ive tried Im not getting the desired outcome would some one please show me the way .
Thanks again