SHARE
TWEET

getlist

vanchelo Oct 11th, 2012 13 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top