<?php // sudo apt install php7.0-sybase header("content-type: text/plain; charset=iso-8859-1"); ini_set("display_errors","1"); error_reporting(E_ALL); $host="localhost"; $db="test"; $uid="sa"; $pwd="mypassword"; $query = "select top 10 * from testtable"; $conn = new PDO( "dblib:host=$host:1433;dbname=$db;", $uid, $pwd); $stmt = $conn->prepare( $query ); $stmt->execute(); while ($r=$stmt->fetch(PDO::FETCH_ASSOC)){ print_r($r); } ?>