$text = nl2br($res_array[\"text\"]) ;
printf(\"%s\",$text);
this code above will force line breaks to make the text fit inside of a constrained box. The function is nl2br($whatyouwanttoprint)
or you could use pre tags whihc will print text as it was pre formatted
printf(\"<pre>$text_to_print</pre>\");
good luck enjoy
peace and balance,
J