[eluser]pmonty[/eluser]
My array looks like this:
Quote:$formdata('sort'=>'perf-desc')
I am loading the view like this:
Quote:$this->load->view('testform',$formdata);
My view code looks like this:
Quote:Sort By: <select name="sorton">
<option value="perf-desc" <?= if ($sort =="perf-desc") ? "selected='selected'" : "selected=''";?> >Perf Desc</option>
</select>
Obviously I am doing something syntactically wrong to get this error:
Quote:Parse error: syntax error, unexpected T_IF in \system\application\views\testform.php on line 10
How should this be coded?
Paul