here is the php code which extracts options to be displayed, unfortunately the data it is importing is quite large and it needs to be trimed. How can i do this?
<select name="college"><option selected="selected" value"">Any college</option>';
$dcolleges = mysql_query("select DISTINCT college from collegetable");
while ($rowcollege = mysql_fetch_array($dcolleges))
{
$college = $rowcollege["college"];
echo "<option value=\"$college\">$college</option>";
}
echo'</select>
One of the option is around 150 charecters, and it appears out of place in my page which looks ugly. I would like to know to know how to trim this to say 50 chars? the value should not be changed but what ever is displayed to the user can be.
Thanks for your help!