Reputation: 809
I'm working with the following json code examples:
http://itunes.apple.com/lookup?id=434290957
http://itunes.apple.com/lookup?id=284910350
How can I get the line breaks in the description to appear in PHP? I think every \n is a line break. Here's my code thus far. Thanks for the help!
<?php
$ch = curl_init('http://itunes.apple.com/lookup?id=434290957');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($ch);
curl_close($ch);
$contentdecoded = json_decode($content,true);
foreach($contentdecoded['results'] as $item) {
echo $item['kind'] ."<br>";
echo $item['description'] ."<br>";
}
?>
Upvotes: 0
Views: 1509