[eluser]cmarra[/eluser]
Hello, but how can I do to execute a callback in a helper, for example
$ CI = & get_instance ();
$ Str = preg_replace_callback ('/(.)/', array ($ CI, "convert_accented_characters"), $ str);
Now "convert_accented_characters" is another method that is in the same helper but I generates the following error:
PHP Notice: in file application / helpers / my_helper.php on line 76: preg_replace_callback () [function.preg-replace-<a href='function.preg-replace-callback'> callback </ a>]: Requires argument 2 , 'Array', to be a valid callback
If we move these two methods directly in the controller does it all!
How can I fix?