title: Display multidimensional array as unordered list using keys and values
body: <p>So I have array like this one. </p>
  
  <pre><code>[
      '0020098238 - Address 1' =&gt; [
          '20011045 - 1',
          '20011880 - 2',
          '20014727 - 3',
          '20015506 - 4'
      ],
      '0020011189 - Address 2' =&gt; [
          '20012490 - 11',
          '20018679 - 22',
          '20023569 - 33',
          '20028843 - 44'
      ],
      '0020102015 - Address 3' =&gt; [
          '20008315 - 55',
          '20008689 - 66',
          '20021267 - 77',
          '20032518 - 88'
      ]
  ]
  </code></pre>
  
  <p>Now, I want to make foreach or implode or something else and as result get list like this one </p>
  
  <ul>
  <li>0020098238 - Address 1
  
  <ul>
  <li>20011045 - 1</li>
  <li>20011880 - 2</li>
  <li>20014727 - 3</li>
  <li>20015506 - 4</li>
  </ul></li>
  <li>0020011189 - Address 2
  
  <ul>
  <li>20012490 - 11</li>
  <li>20018679 - 22</li>
  <li>20023569 - 33</li>
  <li>20028843 - 44</li>
  </ul></li>
  <li>0020102015 - Address 3
  
  <ul>
  <li>20008315 - 55</li>
  <li>20008689 - 66</li>
  <li>20021267 - 77</li>
  <li>20032518 - 88</li>
  </ul></li>
  </ul>
  
  <p>I have tried with foreach($array as $key => $val) and than implode $val but it doesnt work propper. I can collect keys but values from array missing.</p>
  
  <p>Thx</p>
  
  <p>Here is what I have tried (nested foreach)</p>
  
  <pre><code>foreach ($user_sap_data as $customer =&gt; $destinations) {
      echo '&lt;ul&gt;';
          echo '&lt;li&gt;' . $customer . '&lt;/li&gt;';
          foreach ($destinations as $destination) {
              echo '&lt;li&gt;' . $destination . '&lt;/li&gt;';
          }
      echo '&lt;/ul&gt;';
  }
  </code></pre>
  
  <p>but as result I am getting only key of first foreach (in nested foreach)</p>
  
  <p>It is not the same question like <a href="https://stackoverflow.com/questions/27786998/php-nested-array-into-html-list">PHP nested array into HTML list</a> because in other question there are key => (key => val, key => val...) but in this example is key => (val, val, val) etc. its similair but not duplicated</p>