Trim number of characters

Hi,

I am trying to trim number of characters printed by a function in a vbulletin.

See:
{vb:raw post.message}

is a function in vbulletin, which prints the entire message of the post. I need to trim the message output to 20 characters.

I tried this
$mytext=“{vb:raw post.message}”;
echo substr($mytext,0,20);

But no luck as my style editor is only html, i cant use php there. Can anybody here knows vbulletin and how to trim the function output??

Will be waiting for your replies./