Convert editor contents to string

Convert editor contents to string

by Kimber Warden -
Number of replies: 0

I have a moodleform with a field type "editor." When I try to grab the contents of that field using $_POST['text_editor_contents'];  I'm given an array such as:


array(2) { 

["text"]=> string(36) "

Hello World!

" ["format"]=> string(1) "1" 

What do I need to do to get a string such as "Hello <b>World!</b>" instead?

Average of ratings: -