I need to find an image tag in a text entered in TinyMCE.
I’m triyng to find the position of ‘img’, and then, the first ‘>’ starting on the position where appears ‘img’.
So, I’m doing:
strpos($text, '>')
but this don’t return anything.
What I’m doin wrong?
thanks!!
Thanks for the answers!!!
I’ve found my problem:
$text = $act->getText(ESC_RAW)
Without ESC_RAW, symbols like < and > are omitted.
and one more thing. if you use strpos result in if statement, like
and > symbol is first in $text variable, strpos wil return 0 that is the same with false in php. you need use somthing like