We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

how to use the function mb_substr in volt???

Hi!!!

How to use the function mb_substr in volt?? Created a filter, as stated in the documentation, but it does not work. function also does not work.



21.8k
Accepted
answer

You have also it in the documentation :

https://docs.phalcon.io/en/latest/reference/volt.html#extending-volt

then you would do :


// add it as a function :
$compiler->addFunction('mb_substr', 'mb_substr');

// add it aas a filter :
$compiler->addFilter('mb_substr', 'mb_substr');