Hi,
I am using a simple script on my PHP webpage to decode and output JSON as text. However, what ever I try I can't get it to wordwrap
the output.
$file = file_get_contents('sample.txt');
$out = (json_decode($file));
echo $out->mainText;
How can I get this script to wordwrap
at 600 characters without chopping words in half?
If possible, can you show me the whole script please as I am slowly learning.
Thanks