Array To String Conversion PHP Error Message : <p>I'm getting some data from MySQL table like this:</p>

<pre><code>if(isset($_GET['pro_id']))
{
    $product_id = $_GET['pro_id'];
    $get_product = "select * from products where product_id='$product_id'";
    $run_product = mysqli_query($con,$get_product);
    while($row_results=mysqli_fetch_array($run_product))
    {
    $pro_details1 = $row_results['product_details1'];
    $pro_details2 = $row_results['product_details2'];
    $pro_details3 = $row_results['product_details3'];

    function boldifyTitle($pd){
        $pd = explode(':', $pd);
        $pd[0] = "&lt;b&gt;$pd&lt;/b&gt;";
        if(empty($pd[1])) $pd[1] = "";
            return implode(':', $pd);
    }

    if(!empty($pro_details1)){                                  
        echo "&lt;li&gt;".boldifyTitle($pro_details1)."&lt;/li&gt;";
    }
  }
}
</code></pre>

<p>As you can see I have used a function called <code>boldifyTitle()</code> which takes an argument and that argument can be one of the <code>pro_details</code> variables (in this example <code>$pro_details1</code>).</p>

<p>But whenever I run this I get this error:</p>

<p><strong>Notice: Array to string conversion on line 14</strong></p>

<p>And line 14 is this:</p>

<pre><code>$pd[0] = "&lt;b&gt;$pd&lt;/b&gt;";
</code></pre>

<p>So what is wrong here?</p>
