Re: [PHP] Highlighting a stored value as 'selected'

2005-02-08 Thread Alp
Hi Jarratt, Thank you for your advice. I will try that and come back with the result. Alp "RaTT" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Alp > > Try something like, > > > //DB fields as an array > > $db_fields = array('left' => 'left', >'center' => 'center', >

Re: [PHP] Highlighting a stored value as 'selected'

2005-02-08 Thread RaTT
Hello Alp Try something like, 'left', 'center' => 'center', 'right' => 'right'); function drop($array,$sel_name='',$sel_field='',$css=''){ $dropdown = "\n"; foreach($arr as $key => $val){ $sel = ($s

[PHP] Highlighting a stored value as 'selected'

2005-02-08 Thread Alp
Is there an easier way to display/highlight the value stored in the database for a select option? Such as: Stored value is 'center'. The statement is: print ''; print 'Left'; print 'Center'; print 'Right'; print ''; I can have 3 sets of the above tied to 'if's but would rather ask for an easier or