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

php logoThis is a common PHP error, which means that you are trying to access object property on a null/non-existing object. To avoid this, you need to check if the property is defined. So instead of doing something like this, which produces an error:

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):

Last updated Aug 3, 2020