I was contacted by a client who needs the product titles of their Marketpress plugin to be shortened to some many character and then "..." after that limit is reached. This is what the code looks like before any thing is added:
ID) . '">' . ($post->post_title) . '
When I add the code to shorten it says error (and the page won't load as I am sure you have all experienced!). Here is the code I added:
ID) . '">' . ($post->post_title,0,50) . '
If you guys would give me a hand I would be grateful.
P.S. Is there anyway I could use the substr function for php?