|
codeToStackAppendMethodPHP
codeToStackAppendWiki > Syntax > codeTo > codeToStackAppend Parameters
Array of raw code, where key is the field. Array of fields from $codeArray which should be skipped. Callback triggered after every insertion. Three parameters are passed to this callback: DescriptionInjects raw executable code at the beggining of actually matched nodes. Method doesn't change selected elements stack. ExampleMarkup<node1> <node2/> </node1> <node2/> <node1> <node2/> </node1> Data$code = array( 'print "abba";', 'foreach(array(1, 2, 3) as $i) print $i' ); QueryTemplates formula$template-> codeToStackAppend($code) ; Template<node1><node2></node2></node1><node2></node2><node1><node2></node2></node1><?php print "abba"; ?> Template tree beforenode1 - node2 node2 node1 - node2 Template tree afternode1 - node2 node2 node1 - node2 PHP See alsoComments allowed |
Sign in to add a comment