2 $snippets_file = 'snippets.html';
4 include_once('../../contrib/php-xinha.php');
6 if($passed_data = xinha_read_passed_data())
10 $snippets = file_get_contents($snippets_file);
11 preg_match_all('/<!--(.*?)-->(.*?)<!--\/.*?-->/s',$snippets,$matches);
14 for ($i=0;$i<count($matches[1]);$i++
)
16 $id = $matches[1][$i];
17 $html = $matches[2][$i];
18 $array[] = array('id'=>$id,'HTML'=>$html);
20 print "var snippets = " . xinha_to_js($array);