If you want to create a custom functionality in your Joomla site related to the articles and you have to get the article details by using article ID, then keep your close attention in this post as I am going share how to get the article by article ID in Joomla 3.
Copy the below code snippet and use it in any Joomla template file.
* Get article by article ID
$db = &JFactory::getDBO();
$sql = "SELECT introtext FROM #__content WHERE id = ".intval($articleId);
$fullArticle = $db->loadResult();
$fullArticle = "Article is empty";
Liked this program? Do Like & share with your friends.