I'm trying to write a 'foreach' parser function. here is the code: public function foreach2Hook(&$parser, $text = '', $pattern = '', $replacement = '', $insep = ',', $outsep = ',' ) { $text= trim( $text ); $variables = explode(trim($insep), $text); $return = preg_replace(trim($pattern), trim($replacement), $variables); return implode(trim($outsep), $return); }
my problem is that (i think) $text contains unprocessed text. i want the text after the wiki engine has gone over it, or, make it go over it (giving me the resulting html)
thanks, ittay