title: How to print an array of links in PHP
body: <p>Need some php help in figuring out how use this array I created, but first of all I'm not sure if I done this right?? Its an array with names and href links that I would like to map for given server. Pls let me know if I constructed this properly:</p>
  
  <pre><code>  $server_array = array(
          'server1.domain' =&gt; array(
          'href' =&gt; 'https://server1.domain.com:8080'
    ),
          'server2.domain' =&gt; array(
          'href' =&gt; 'https://server2.domain.com:8080'
    ),
          'server3.domain' =&gt; array(
          'href' =&gt; 'https://server3.domain.com:9999'
   ...
  );
  </code></pre>
  
  <p>I want to map the data from my key <code>Server</code> to one of these links. So far, I've created a table with the server names and all I want to do is map that server name to one of the above hyper links within the table.</p>
  
  <p>Can someone show me how to tweak my print code to do this? Thanks.</p>
  
  <p>Code to display the table with servername:</p>
  
  <pre><code>$keys = array('Server', Target','Set','Time', 'Length','Size','Status');
  echo '&lt;table id="stats_1"&gt;&lt;tr&gt;';
  foreach ($keys as $column)
     echo '&lt;th&gt;' . $column . '&lt;/th&gt;';
      echo '&lt;/tr&gt;';
  
  $counter=0;
  foreach ($data as $row){
    $counter ++;
      $class = $counter % 2 === 0 ? 'alt1' : 'alt2';
      echo '&lt;tr class="' . $class . '"&gt;';
       foreach ($keys as $column){
          if (isset($row[$column])){
            echo '&lt;td&gt;' . $row[$column] . '&lt;/td&gt;';
          } elseif ($column == 'Status') {
            echo '&lt;td&gt; Check Logs &lt;/td&gt;';
          } elseif ($column == 'Length') {
            echo '&lt;td&gt; n/a &lt;/td&gt;';
          } elseif ($column == 'Size') {
            echo '&lt;td&gt; n/a &lt;/td&gt;';
          } else {
            echo '&lt;td&gt; &lt;/td&gt;';
          }
       }
  }
  echo '&lt;/table&gt;';
  </code></pre>