Select drop down

Gestart doorAllard3 reacties31 weergaven

4 berichten · pagina 1 van 1

Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Beste leden,

Ik zit helaas met een probleem. Ik heb nu dit:

[COLOR= #0000BB]<?php[/COLOR]
             [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$langs[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$lang_id[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$lang_arr[/COLOR][COLOR= #007700])
             {[/COLOR]    
                             [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$lang_id[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$language[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<option value="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$lang_arr[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]title[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" selected="selected">[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$lang_arr[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]title[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</option>[/COLOR][COLOR= #007700];
                }[/COLOR]        
                [URL="http://www.php.net/else"]else[/URL]
                [COLOR= #007700]{[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<option value="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$lang_arr[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]title[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$lang_arr[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]title[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</option>[/COLOR][COLOR= #007700];
                }
             }[/COLOR]
            ?>


Het eerste stuk gaat over wat er selected moet worden. Maar dat werkt niet. Het gene dat selected moet worden is $language. Die staat in mijn config.php.
0
Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Moet je dan niet de config include?smile
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Laat maar slotje.
0
Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat was het probleem?smile
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren