title: odbc is an invalid data source name
body: <p>I want to get data from sql to show as an table in my php page. Here is the code I made but it gives me the error "Invalid data source name"
  <a href="https://i.stack.imgur.com/gQbdn.png" rel="nofollow noreferrer">This is the code I made</a></p>
  
  <p>Is there someone that can help me whit this problem?</p>
  
  <p>this is where the problem is I think</p>
  
  <pre><code>try {
                      $conn = new PDO("odbc");
                      $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
                      $stmt = $conn-&gt;prepare("SELECT Username, Password FROM user");
                      $stmt-&gt;execute();
  
                      // set the resulting array to associative
                      $result = $stmt-&gt;setFetchMode(PDO::FETCH_ASSOC);
                      foreach(new TableRows(new RecursiveArrayIterator($stmt-&gt;fetchAll())) as $k=&gt;$v) {
                          echo $v;
                      }
                  }
  </code></pre>