- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
//выдерает из текста все метки и вовзращает вввиде массива
	private function returnLabels($html)
	{
		$labels = array();
		$s = "" ;
		$flag = false ;
		for ($i=0;$i<strlen($html);$i++)
		{
			if (substr($html,$i,strlen("{module:")) == "{module:")
			{
				$flag = true ;
			}
			if (substr($html,$i,strlen("{language:")) == "{language:")
			{
				$flag = true ;
			}
			if (substr($html,$i,strlen("{image:")) == "{image:")
			{
				$flag = true ;
			}
			if (substr($html,$i,strlen("{file:")) == "{file:")
			{
				$flag = true ;
			}
			if (substr($html,$i,strlen("{js:")) == "{js:")
			{
				$flag = true ;
			}
			if (substr($html,$i,strlen("{css:")) == "{css:")
			{
				$flag = true ;
			}			
			
			if (substr($html,$i,strlen("}")) == "}" && $flag == true)
			{
				$s .="}";
				$labels [] = $s ;
				$s = "" ;				
				$flag = false ;
			}
			
			if ($flag == true)
			{
				$s .= substr($html,$i,1);
			}
		}
		
		return $labels;
	}
                                 
        
Караваны могут быть спокойны.
<title>{module:cabinet=f} {module:cabinet=i} {module:cabinet=o}</title>