I'm having some trouble getting nl2br
to do what I want.
Can someone explain why nl2br
doesn't change the \n
in the JSON data to < br />
in my PHP?
Here is the code:
$page = file_get_contents('JSON_FEED_URL');
$page2 = nl2br($page);
When I echo $page2
and view the HTML page it comes out as a big wall of text.