How can I convert line breaks into codes? For instance,
$array = array(
'title' => 'abc',
'content' => 'a paragraph
line break
line break
'
);
I want to convert $array['content'] to
a paragraph\r\n\t\r\n\tline break\r\n\t\r\n\tline break\r\n\t\r\n\t
Something along these lines?