Monday, 30 September 2013

How is the position of an array pointer determined in a preg_replace_callback's callback function with an array of subjects?

How is the position of an array pointer determined in a
preg_replace_callback's callback function with an array of subjects?

e.g.
$array = preg_replace_callback("/pattern/", create_function( '$matches',
'[WHAT IS MY ARRAY POSITION? ($foo = ...)]; return $foo);' ), $array);

No comments:

Post a Comment