Thanks for the reply!
I wasn't using substr, because however I placed it, I broke the code, I needed to know how to place it.
I worked on this for hours before asking, then I found the solution 5 minutes after asking.
I just changed
strip_tags($lis ting['products_descr iption'], '<br>')
to
substr(strip_ta gs($listing['products_descr iption'], '<br>'), 0, 100...
User Profile
Collapse
-
How can I combine strip_tags and substr ?
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.
...Code:else { $lc_text = ' <big><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath='
No activity results to display
Show More
Leave a comment: