Dynamically populate drop down list with PHP / MSSQL

I have this working with MySQL, but I can’t get it to work with MSSQL. Here’s the snippet that I’m using:

        <?php
                $vendors_list = @mssql_query("SELECT Vendor_ID,Vendor FROM dbo.KeyList_Vendor ORDER BY Vendor ASC"); 
                $vendors_options="";

                while ($row=mssql_fetch_array($vendors_list, MSSQL_ASSOC)) {

                    $id=$row["Vendor_ID"];
                    $Vendor=$row["Vendor"];
                    $vendors_options.="<option value=\\"$id\\">".$Vendor;
                }
            ?>
            <select class="forms" name="Vendor">
                <optgroup label="Vendor:">
                    <option value="-1">Select one</option>
                    <?php=$vendors_options?> 
                </optgroup>
            </select>

Apparently I cannot edit my prior post, this is what I meant to post:

            <?php
                $sql = "SELECT Vendor_ID,Vendor FROM dbo.KeyList_Vendor ORDER BY Vendor ASC";
                $vendors_list = sqlsrv_query($conn, $sql);
                $vendors_options="";

                while ($row = sqlsrv_fetch_array($vendors_list, SQLSRV_FETCH_ASSOC))
                {
                    $id=$row["Vendor_ID"];
                    $Vendor=$row["Vendor"];
                    $vendors_options.="<option value=\\"$id\\">".$Vendor;
                }
            ?>
            <select class="forms" name="Vendor">
                <optgroup label="Vendor:">
                    <option value="-1">Select one</option>
                    <?php=$vendors_options?> 
                </optgroup>
            </select>

Does MySQL do that ‘dbo.’ prefix? When I was messing with MySQL it never had that.

What error do you get? That might help people narrow down what is wrong.