united states of america usa  linkedinfacebook   Call Us Today: (786) 646-6461

php logoThere's a useful function in PHP called nl2br, which breaks up a paragraph with regular line breaks and replaces them with <br /> HTML breaks. It works great, but sometimes you need to break the paragrpah into actual paragraphs, separated by <p> and </p>. The function below does exactly that - finds line breaks (\n) and encapsulates the text in <p></p> tags:

joomlaThis is a code snippet which allows to get the article modified date from an article itself. This has to be done in a template (or other code). The first part is to identify the item as article and second part to extract the modified date of the article (Tested with Joomla 2.5):