Advertisement
vanchelo

getlist

Oct 11th, 2012
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. $c = $modx->newQuery('modResource');
  2. $c->select(array('id','pagetitle'));
  3.  
  4. $collection = $modx->getCollection('modResource',$c);
  5.  
  6. foreach($collection as $key => $res) {
  7.     $res = $res->toArray();
  8.     echo '<pre style="font:14px Verdana">';
  9.     print_r($res);
  10.     echo '</pre>';
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement