PHP: Echoing Variables Error
<p>Goal: To display a category select-box and its corresponding subcategory select-box. MySQL table is set up to have id(primary key), master_id(referencing on the primary key) and name. I set 4 error code blocks and after debugging i keep getting "error 2:true". Thus, displaying a category but no subcategory.  How come i keep getting this error? Is there something missing?</p>

<p><strong>PHP comparing category&amp;value to display on the subcategory selectbox</strong>
    

<pre><code>if (!empty($_GET['id']) &amp;&amp; !empty($_GET['value'])) {

    $id = $_GET['id'];
    $value = $_GET['value'];

    try {
        $objDb = new PDO("mysql:host=" . $host . ";dbname=" . $db, $user, $pass);


        $sql = "SELECT * FROM `categories` WHERE `master_id`=?";
        $statement = $objDb-&gt;prepare($sql);
        $statement-&gt;execute(array($value));
        $list = $statement-&gt;fetchAll(PDO::FETCH_ASSOC);

   }
?&gt;
</code></pre>
