Hello, I'm having trouble applying the substr function to the following code below. I'm trying to limit to amount of characters displayed from the 'headline' to 60, It should be simple enough but i keep getting syntax errors.
This is a simple example of of how the substr is used:PHP Code:<?php print "<div class='resultHeading'> <a href= 'javascript: void(0)'> ".$row['headline']." </a> ";?>
ThanksPHP Code:<?php print substr($smallDesc, 0,129); print"..."?>


Reply With Quote
Bookmarks