I want to strip tags and return the first x characters. Every combo I try fails.
The code below is where I'm at. It works perfectly stripping the tags, it fails when I try to add substr to limit the length. Not that it should matter, but this is within an Oscommerce setup.
Any help would be greatly appreciated.
Thanks,
Walter
The code below is where I'm at. It works perfectly stripping the tags, it fails when I try to add substr to limit the length. Not that it should matter, but this is within an Oscommerce setup.
Code:
else {
$lc_text = ' <big><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</big></a> <br><br>' . strip_tags($listing['products_description'], '<br>') . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . '<strong><font color="#36C426">(...more)</font></strong></big></a>' . ' ';
}
Thanks,
Walter
Comment