Potrzebuje prostego systemu szablonów, który będzie wstanie obsłużyć foreach.
Zdołałem zrobić coś takiego
  1. <?php
  2. class Template {
  3. static $templates;
  4. static $dir;
  5. static $vars = array();
  6.  
  7. public function __construct($templates = 'default', $dir = './styles/') {
  8. self::$templates = $templates;
  9. self::$dir = $dir;
  10. }
  11.  
  12. public static function assign($key, $value) { 
  13. self::$vars[$key] = $value;
  14. }
  15.  
  16. public static function display($file) {
  17. if( $file ) {
  18. $file = self::$dir . self::$templates . '/' . $file;
  19. if( @file_exists( $file ) && @is_readable( $file ) ) {
  20. extract( self::$vars, EXTR_SKIP );
  21. include_once( $file );
  22. }
  23. }
  24. }
  25. }
  26. ?>


Da się coś z tego zrobić czy skorzystać z innych skryptów?