 <p>Simply use <code>echo form_dropdown('school', $school_list, set_value('school', @$school-&gt;id));</code></p> <p>Then you know by the <code>@</code> that value may be empty sometimes, and it supresses errors if that value is missing.</p> <p>Doing this will send a <code>NULL</code> value to the 3rd parameter if you have no id, and it will instead select the first <code>&lt;option&gt;</code> by default.</p>