if i have a line like this.
<option value="someval">somval</option>
how can i put the position the cursor after the last quotation of value and put something like abcdef ?
so the output would be
<option value="somval" abcdef>somval</option>
with php?
i want to do this dynamically i cant figure out how to do it , im looking at strpos() but dont see how it can be done. what ill be doing with this is ill post a bunch of option tags into a textbox and code will be generated. so ill have alot of options fields.
@martin - say i have a huge dropdown and each option lists a country that exists. rather than having to manually type out something like this:
$query = $db->query("my query....");
while($row = $db->fetch($query)) {
<select name="thename">
<option value="someval" <?php if($row['someval'] == 'someval') { print "selected"; } ?> >someval</option>
<option value="someval" <?php if($row['someval'] == 'someval') { print "selected"; } ?> >someval</option>
<option value="someval" <?php if($row['someval'] == 'someval') { print "selected"; } ?> >someval</option>
... followed by 100 more because there are alot of locations to list.
im just trying to figure out how i can post all the options i have into a textbox and have the above code automatically generated to save alot of time. get what i mean?