Posted By


chucktrukk on 02/16/08

Statistics


Viewed 533 times
Favorited by 0 user(s)

chunkListParser


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. $ar_chunks = split(',',$chunks);
  4. $ar_chunks = array_unique($ar_chunks);
  5.  
  6. $output = '';
  7.  
  8. foreach ($ar_chunks as $chunk) {
  9. if ($chunk != '') {
  10. $c = $modx->getChunk($chunk);
  11. if ($c) $output .= $c;
  12. }
  13. }
  14.  
  15. if ($output != '' && isset($wrapperdiv)) {
  16. $output = '<div id="'.$wrapperdiv.'">'.$output.'</div>';
  17. }
  18.  
  19. return $output;
  20.  
  21. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.