Hi there Please assist me with the following.

I'm try to create a function so that is does the following.
if ($Row[s_dial1]=="0"){
print ("<select size=1 name=s_dial1>
<option value=0 selected>0</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
print ("</select>");
}

if ($Row[s_dial1]=="1"){
print ("<select size=1 name=s_dial1>
<option value=0>0</option>
<option value=1 selected>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
print ("</select>");
}

This in turn does the following

If the Db field $Row[s_dial1] = 0
the drop down will display 0

if the Db fild $Row[s_dail1]=1
the drop down will display 1 etc......

Now instead of printing all these if statements is there a shorter function
that i can use or that you can help me develope

Thank in advance
Marcus





==========================================================
This message contains information intended for the perusal, and/or use (if
so stated), by the stated addressee(s) only. The information is
confidential and privileged. If you are not an intended recipient, do not
peruse, use, disseminate, distribute, copy or in any manner rely upon the
information contained in this message (directly or indirectly). The sender
and/or the entity represented by the sender shall not be held accountable
in the event that this prohibition is disregarded. If you receive this
message in error, notify the sender immediately by e-mail, fax or telephone
representations contained in this message, whether express or implied, are
those of the sender only, unless that sender expressly states them to be
the views or representations of an entity or person, who shall be named by
the sender and who the sender shall state to represent. No liability shall
otherwise attach to any other entity or person.
==========================================================


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to