title: Join function not working in PHP
body: <p><strong>Code:</strong></p>
  
  <pre><code>$file=file(example);
  $arr[]=$file[0];
  $arr[] .="interactions. Sage Publications.";
  
  echo count($arr);  //outputs 2
  echo $arr[0];  //outputs   Multiple Regression: Testing and Interpreting
  echo $arr[1];  //outputs   interactions. Sage Publications
  
  $str=join(" ",$arr);
  //outputs
  Multiple Regression: Testing and Interpreting
  interactions. Sage Publications
  </code></pre>
  
  <p><strong>Issue:</strong> Though I use join function the two arrays are not joined in the output. Am getting the output in two lines. I want it in a single line.</p>
  
  <p><strong>Alternative code:</strong></p>
  
  <pre><code>$arrp =array("Multiple Regression: Testing and Interpreting","interactions. Sage Publications.");
  $str= join(" ",$arrp);
  echo $str; //outputs Multiple Regression: Testing and Interpreting interactions. Sage Publications
  </code></pre>
  
  <p>If I parse the array value directly into the variable am getting the desired output(i.e.output in a single line).What's the wrong in my previous code.Are both code not same?</p>
  
  <p>Thanks in advance.</p>