PHP regex templateparser -
Dear programmer and code devil,
I have found this function
& lt ;? Php function ListRow ($ name) {preg_match_all ("'{row name ='" $ name. "'} (. *?) {\ / Row}' si", $ this- & gt; Tpl, $ match); Return match [1]; }? & Gt; What is it going to do to get information between {row name = 'products'} and {/ row} Used to be. It receives data between tags if they are on the same line but enter them, it does not catch anything, I'm just stuck on it, so I appreciate some help and then some as well.
This works, for me (see the "return" row, this is the only difference in your code ..):
& lt ;? Php Print Lynxsu ("ABC"); Function linkerave ($ name) {preg_match_all ("/ {line name = '" $ name. "' (. *?) {\ / Row} /", "{row name = 'abc' TEXT_SEARCHED {/ row}" , $ Match); Return match [1] [0]; }? & Gt; And now, test it ...: $ php test.php TEXT_SEARCHED
Comments
Post a Comment