joomla content out

Array
(
    [id] => 5
    [title] => Welcome to Ashish R Garg & Co. Website
    [asset_id] => 42
    [alias] => homepage
    [introtext] =>

Ashish R Garg & Co. combines the depth and expertise with the personal attention, value for money focus and relationship approach of the smaller firms. This service focus has made us the reputed firm in each of our chosen markets and the business advisers of choice markets and the business advisers of choice to dynamic Indian Business and their owners when they seek to unlock their potential for growth.

    [fulltext] =>

It is a professionally managed firm. The team consists of distinguished chartered accountants, corporate financial advisors and tax consultants. The firm represents a combination of specialized skills, which are geared to offer sound financial advice and personalized proactive services. Those associated with the firm have regular interaction with industry and other professionals which enable the firm to keep pace with contemporary developments and to meet the needs of its clients.

    [state] => 1
    [catid] => 9
    [created] => 2014-08-25 12:32:24
    [created_by] => 0
    [image_intro] => media/content/devices.png
    [image_intro_alt] => image_intro_alt
    [float_intro] => left
    [image_intro_caption] => Intro image caption
    [image_fulltext] => images/joomla_black.gif
    [image_fulltext_alt] => full_image
    [image_fulltext_caption] => full_caption
    [urla] => http://linka.in
    [urlatext] => linka text
    [targeta] => 0
    [urlb] => http://linkb.in
    [urlbtext] => linkb text
    [targetb] => 1
    [urlc] => http://linkc.in
    [urlctext] => linkc text
    [targetc] => 2
    [attribs] => {"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","urls_position":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}
    [ordering] => 0
    [metakey] => Meta Keywords
    [metadesc] => Meta Description
    [access] => 1
    [hits] => 0
    [metadata] => {"robots":"index, follow","author":"Author","rights":"Content Rights","xreference":"ExternalReference.in","tags":null}
    [featured] => 0
    [xreference] => Key Reference
)

PHP script to get all article IDs joomla

 

You could use the following:

 

$query = "SELECT * FROM #__content";
$db = JFactory::getDBO();
$db->setQuery($query); 
$articles = $db->loadObjectList(); 
foreach($articles as $article){
    echo 'ID:' . $article->id . ' Title: ' . $article->title;
}

 

If you want to get all the ID’s of articles from a specific category, you could use the following:

 

$catId = 59;
$query = "SELECT * FROM #__content WHERE catid ='" . $catId . "'";
$db = JFactory::getDBO();
$db->setQuery($query); 
$articles = $db->loadObjectList(); 
foreach($articles as $article){
    echo 'ID:' . $article->id . ' Title: ' . $article->title;
}

 

Obviously you change 59 to whatever suits your needs

 

Note that this method of a database query is for Joomla 1.5