title: How to dynamically turn rows into columns and vice versa
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3288014/select-mysql-rows-but-rows-into-columns-and-column-into-rows">Select MYSQL rows but rows into columns and column into rows</a>  </p>
  </blockquote>
  
  
  
  <p>How to display from: </p>
  
  <pre><code>╔══════╦════╦════╗
  ║ Code ║ A  ║ B  ║
  ╠══════╬════╬════╣
  ║ xxxx ║ 50 ║ 63 ║
  ║ yyyy ║ 38 ║ 68 ║
  ║ .... ║ .. ║ .. ║
  ╚══════╩════╩════╝
  </code></pre>
  
  <p>to like this:</p>
  
  <pre><code>╔══════╦══════╦══════╦═════╗
  ║ Code ║ xxxx ║ yyyy ║ ... ║
  ╠══════╬══════╬══════╬═════╣
  ║ A    ║   50 ║   63 ║ ... ║
  ║ B    ║   38 ║   68 ║ ... ║
  ╚══════╩══════╩══════╩═════╝
  </code></pre>
  
  <p>As it may have a few "code" like xxxx, yyyy, zzzz, ...<br>
  So, I need to display all the "code" in dynamically without hard-coded.</p>