It's a 10-minutes job if you master the PHP language.
-------------------------------
We have on our website a PHP file that generate a TXT file.
This generated TXT file contains the inside of a big drop-down list :
<option value="1-Player">1-Player </option>
<option value="2-Player (Alternatively)">2-Player (Alternatively) </option>
<option value="2-Player (Simultaneous)">2-Player (Simultaneous) </option>
Etc...
Portion of the actual code is :
foreach ($listeunique as $valeur)
{
$a_ecrire = "<option value=\"".$valeur."\">";
$a_ecrire.= htmlspecialchars($valeur)." ";
$a_ecrire.= "</option>";
fwrite($ouverture, $a_ecrire, 4096);
}
fclose($ouverture);
unset($ouverture, $a_ecrire);
------------------------------------
Some values in this list are presented like this :
<option value="AOF/Eiji">AOF/Eiji </option>
<option value="AOF/Jack">AOF/Jack </option>
<option value="AOF/Jin">AOF/Jin </option>
Etc...
What's we want is the PHP file should generate something like this automatically :
<optgroup label="AOF">
<option value="AOF/Eiji">Eiji</option>
<option value="AOF/Jack">Jack</option>
<option value="AOF/Jin">Jin </option>
</optgroup>
Everything before the / should appears as an <optgroup> automatically done by the PHP file. And this <optgroup> should close at the good place for each family. There are many cases:
<option value="Aircrafts/Lockheed">Aircrafts/Lockheed </option>
<option value="Aircrafts/McDonnell">Aircrafts/McDonnell</option>
.......
<option value="Animals/Bears">Animals/Bears </option>
<option value="Animals/Birds">Animals/Birds </option>
<option value="Animals/Cats">Animals/Cats </option>
......
Etc...
Hi, I have 3+ years of experience in web development, I can fix this in 10 minutes. I checked the snippet you posted and I can fix this very fast. I will need the file and dependency files with which are required to fix.
Thank you