Templates list for demos


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



Copy this code and paste it in your HTML
  1. $templatearray = array();
  2. $commercial = new DirectoryIterator('demos');
  3. foreach($commercial as $file)
  4. {
  5. if($file->isDot() || !$file->isDir()) continue;
  6. $path = $file->getPathname().'/templates/'.$file->getBasename().'/templateDetails.xml';
  7. if(!file_exists($path)) continue;
  8. $xml = simplexml_load_file($path);
  9. $templatearray[$file->getPathname()] = (string)$xml->name;
  10.  
  11. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.