Q: Putting line breaks in text within a PHP array I have an array with a bunch of youtube video data that I call in a php file and populate a page. Basically in the array I have a lot of text ie a description of the video that I want to have line breaks. 
Basically when I make this call, $description puts all the text on the same line, I want to make paragraphs or new lines on some of the text, but I'm not sure how to do that in the array. 
<div class="transcription-container"><p class="transcription"><?php echo $**description** ?></p></div>

the array
    'youtube-video-key' => [
        'youtube-id' => 'aRtFSDvd5',
        '**description**' => LotsoftextLotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext  Lotsoftext     
        'title' => 'youtube-video-title',
        'url' => 'www.youtube.com/url',
        'time' => '1:59',
        'thumbnail' => '../../images/thumbnails/thumb2.jpg'
    ],

So in the array how would I go about putting new line breaks under 'description' ??

A: You can use \n as follows:
'youtube-video-key' => [
    'youtube-id' => 'aRtFSDvd5',
    '**description**' => 'one line \n second line'     
    'title' => 'youtube-video-title',
    'url' => 'www.youtube.com/url',
    'time' => '1:59',
    'thumbnail' => '../../images/thumbnails/thumb2.jpg'
],


A: In php you work with browsers, so you need to slip in "" tag where you need a new line instead of "\n"
For example :
< ?php 
foreach ($myarray as $a){
    echo $a . "<br>";
}


A: You just need to put 
"\n"

In your string. Note that you must use double quotes. 
So 
"some text here\n will put in a line\nbreak";


A: You can just use \n which is converted to a line break when viewed.
so:
description => "alot of text.... and some more/nThen on the next line",

A: Not sure do you want to have text in multiple line in web browser (HTML) or new lines in page source.
But anyway, you have to make up your mind - what text should represent new line (in your example code it's double space character, but not sure is it just example - can be something else) and search/replace it with "\n" if you want to have source well formatted or with <br/> tag if you want to have new line in the browser.
