Database value show twice
<p>Here is my code to retrive value from database </p>

<pre><code>    $query = "SELECT * FROM t_contact
                      WHERE id = {$project_details_id} LIMIT 1";
     $all_post_info1 = mysql_query($query, $connection);
     confirm_query($all_post_info1);
     $project_details = mysql_fetch_array(show_project_details($project_details_id));

     foreach ($project_details as $fieldname) {
        echo $fieldname . "&lt;/br&gt;";
     }
</code></pre>

<p>And </p>

<pre><code>function confirm_query($confirm_result) {

    if (!$confirm_result) {
        die("Database query failed1: " . mysql_error());
    }
}
</code></pre>

<p>And i get output twice for each field. There are 27 column in my database and i get 54 output.
For example, there are name, email column in database and my output shows like</p>

<pre><code>name
name
email
email 
</code></pre>

<p>Some please tell me what is wrong with this code.</p>
