01-22-2009, 08:35 PM
|
#4 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by Wildhoney
Do you mean something like this?
php Code:
class TalkPHP_Callback { public function get ($aCaptured) { return $aCaptured[ 1]; }}$pCallback = new TalkPHP_Callback (); echo preg_replace_callback('~I Love (.+)~', array($pCallback, 'get'), 'I Love TalkPHP');
|
Yes but it keeps saying argument 2 of preg_replace_callback is an invalid callback. I used create_function() and that seems to be doing something, I haven't tested all the code of that yet, so I'll get back on to this topic.
__________________
VillageIdiot can have my babbies ;d
|
|
|
|