function formatArticleResultSet($result)
 {
     $articledata = array();
     if ($result != null) {
         $n = count($result);
         for ($i = 0; $i < $n; $i++) {
             $article = new NewsArticles();
             $article->setnewsID($result[$i]->newsID);
             $article->setArticleNewstitle($result[$i]->newstitle);
             $article->setArticleBody($result[$i]->newsdesc);
             $article->setArticleDateCreated($result[$i]->datecreated);
             $article->setArticleStatus($result[$i]->status);
             $articledata[$i] = $article;
         }
         return $articledata;
     } else {
         return false;
     }
 }