title: PHP: Getting values from array index
body: <p>I have file with datas. Every line has name of author/authors..it looks like this:</p>
  
  <pre><code>"Giacometti, Jasminka"; "Mazor Jolic, Slavica"; "Josic, Djuro";
  "Hoffmeister, Karin M"; "Grozovsky, Renata"; "Jurak Begonja, Antonija"; "Hartwig, John H";
  "Jakopovic, Boris"; "Kraljevic Pavelic, Sandra"; "BelScak-Cvitanovic, Ana"; "Harej, Anja"; "Jakopovich, Ivan";
  </code></pre>
  
  <p>For example, for the first row:</p>
  
  <pre><code>"Giacometti, Jasminka"; "Mazor Jolic, Slavica"; "Josic, Djuro";
  </code></pre>
  
  <p>I need to get this and write it in another file:</p>
  
  <pre><code>"Giacometti, Jasminka"; "Mazor Jolic, Slavica";1
  "Giacometti, Jasminka"; "Josic, Djuro";1
  "Mazor Jolic, Slavica"; "Josic, Djuro";1
  </code></pre>
  
  <p>How can I do it in php? I tried with getting every line in the array, but then I don't know how to split datas from that row.</p>
  
  <pre><code>$handle = @fopen("datas.txt", "r");
  $listA = array();
  if ($handle) {
      while (($buffer = fgets($handle, 4096)) !== false) {
          $listA[] = $buffer; 
  }
  </code></pre>
  
  <p>Thank you.</p>