- 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
function parce($string)
{//function open
$breaktags=array ("<"," ","=","","т");
for ($pos=0;$pos<strlen($string);$pos++)
{//for text
if (substr($string,$pos,1)=="{" and substr($string,$pos+1,1)=="%")
{// if open symbols finded
$tagopened=1;
while($tagopened==1){//while opened
for($inpos=$pos+2;$inpos<10000;$inpos++){// =)
if ( (substr($string,$inpos,1)=="%" and substr($string,$inpos+1,1)=="}") or in_array(substr($string,$inpos,1),$breaktags)) {break 2;$tagopened=0;}//br
$intag=$intag.substr($string,$inpos,1);
}//for inpos
}//while opened closing
$intag=explode("->",$intag,2);
echo("$intag[0] with $intag[1] action!<br>");
unset($intag);
} else {//if symbols finded
$symbol=substr($string,$pos,1);
echo("$symbol");
}
}//for all text closing
}//function end;