Anyone understand what this code is doing? 
<p>Trying to write an explanation of what its doing step by step. Thank you</p>

<pre><code>&lt;div id="formLeft"&gt;
    &lt;p&gt;New Customers: &lt;/p&gt;
    &lt;form name="Create_Account" method="post" action="?page=register"&gt;
    &lt;table id="formTable"&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;Title: &lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;select name="title" id="title"&gt;
            &lt;option value="0"&gt;Select Title&lt;/option&gt;
            &lt;?
            foreach($titlesArray as $key =&gt; $value){
                // if title is selected 
                if ($title == $key)
                $selected = true; 
                else
                $selected = false; 

                echo '&lt;option value="'.$key.'"';

                if($selected) 
                echo ' selected="selected"';

                echo '&gt;'.$value.'&lt;/option&gt;';
            }
            ?&gt;
            &lt;/select&gt;
        &lt;/td&gt; 
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;Forename:&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input name="forename" type="text" value="&lt;?php if(isset($_POST['forename'])){  echo $forename; } ?&gt;" /&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
</code></pre>
