(A) The function is defined this way near the top of your php file: $field \n"; // The function will return($rows); at the end } ?> (B) Your php page will then open a database, do a query. Any query is OK. "SELECT * FROM PWANG_TABLE" "SELECT name, address FROM RLAU_TABLE" "SELECT item, price, shipping FROM Another_TABLE" Then do $resultSet = @mysql_query($query, $link); // $resultSet may be null (C) To display table do print "