title: Counting blank spaces till next string in PHP array
body: <p>I have imported .xlsx file to PHP through a script. I only need two columns from the file 
  <a href="https://i.stack.imgur.com/yO5CV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yO5CV.png" alt="http://imgh.us/xlsxx.png"></a></p>
  
  <p>This is done, but as you can see there is address and following it blank spaces.
  I need the information from right column to be in one string corresponding to the address on the left.</p>
  
  <pre><code>foreach ($Reader as $Row)
      {
          array_push($data, $Row);
          $aadress_loc = array_search("Aadress", $Row);
          $eluruumid = array_search("Ehitise osad", $Row);
          array_push($asukohtruumid, $aadress_loc);
          array_push($asukohtruumid, $eluruumid);
      }
      $li_length = count($data);
      for ($i = 1; $i &lt; $li_length; $i++){
          array_push($aadress_mas,($data[$i][$asukohtruumid[0]])); // left column
          array_push($ruumid_mas,($data[$i][$asukohtruumid[1]]));  // right column
      }
  
  Array
  (
  [0] =&gt; Harju maakond, Kernu vald, Laitse küla, Lossi tee 6
  [1] =&gt; 
  [2] =&gt;  // 0;2 is the length of the first element
  )
  Array
  (
  [0] =&gt; E/1;E/2;E/3;E/4;E/5;E/6;M/7/Kontoriruumid;E/8;E/9
  [1] =&gt; E/10;E/11;E/12;E/13;E/14;E/15;E/16;E/17;E/18;E/19
  [2] =&gt; E/20;E/21;E/22;E/23;E/24
  so I need to merge these 0;2 elements from another array to one string 
  and repeat the process with another elements from aadress array.
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/4yw0Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4yw0Q.png" alt="enter image description here"></a></p>
  
  <p>Here is the array with the diffrences but I don't       know how can I use it to do what I need.
  Sorry for not so good english.</p>