Convert DB string into checkbox checking with PHP
<p>I have following SQL query: </p>

<pre><code>    $readNews_SQLselect = "SELECT ";
    $readNews_SQLselect .= "live, content, user, created, created_updated, user_updated ";  // rows names
    $readNews_SQLselect .= "FROM ";
    $readNews_SQLselect .= "news ";         // table name


    $readNews_SQLselect_Query = mysql_query($readNews_SQLselect); 
</code></pre>

<p>And while loop to display the data from DB:</p>

<pre><code>    while ($row = mysql_fetch_array($readNews_SQLselect_Query, MYSQL_ASSOC)) {
                    $LIVE = $row['live'];
                    $CONTENT = $row['content'];
                    $USER = $row['user'];
                    $CREATED = $row['created'];
                    $USER_UPDATED = $row['user_updated'];
                    $CREATED_UPDATED = $row['created_updated'];
                    echo '&lt;input type="checkbox" value=" '.$LIVE.'" /&gt;';
                    echo '&lt;input value=" '.$CONTENT.'" /&gt;';
                    echo '&lt;p&gt;'.$USER.'&lt;p/&gt;';
                    echo '&lt;p&gt;'.$CREATED.'&lt;p/&gt;';
                    echo '&lt;p&gt;'.$USER_UPDATED.'&lt;p/&gt;';
                    echo '&lt;p&gt;'.$CREATED_UPDATED.'&lt;p/&gt;';
                }
                mysql_free_result($readNews_SQLselect_Query);
</code></pre>

<p><strong>As my <code>echo '&lt;input type="checkbox" value=" '.$LIVE.'" /&gt;';</code> will be either '0' or '1' - how can I convert this string into checkbox checking / unchecking with PHP?</strong></p>

<p>Any suggestion much appreciated. </p>
