Splitsen in twee kolommen

Gestart doorVince3 reacties29 weergaven

4 berichten · pagina 1 van 1

Vince

Lid · Topicstarter

Berichten
1.028
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<ul>
        [COLOR= #0000BB]<?php
        $top2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT DISTINCT(brand) as brand FROM `products` where brand !=  ORDER BY brand"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$top1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top2[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top1[/COLOR][COLOR= #007700]))
        {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<li><a href="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$config_mainHREF[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]/merk/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]brand[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]/">[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]brand[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</a></li>[/COLOR][COLOR= #007700];
        }[/COLOR]
        ?>
                </ul>


Uit deze query komt één lange rij woorden on elkaar in
  • . Nu wil ik dat gelijkwaardig verdelen in 2 of meerdere rijen. Dus zodat er dit uitkomt.
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    Vergoeding voor de gene die me hierbij kan helpen. clown
    0
    Berichten
    515
    Reputatie
    0
    Punten
    0,00
    Lid sinds
    Laatst gezien
    Probeer dit eens :

    [COLOR= #0000BB]<?php
            $top2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT DISTINCT(brand) as brand FROM `products` where brand !=  ORDER BY brand"[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$top1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top2[/COLOR][COLOR= #007700]);[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<ul>[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$teller[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top1[/COLOR][COLOR= #007700]))
            {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<li><a href="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$config_mainHREF[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]/merk/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]brand[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]/">[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]brand[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</a></li>[/COLOR][COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$teller[/COLOR][COLOR= #007700]++;[/COLOR]
                
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$teller[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</ul><ul>[/COLOR][COLOR= #007700];
                }
            }[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000] </ul>[/COLOR][COLOR= #007700];[/COLOR]
    ?>
    0
    Vince

    Lid · Topicstarter

    Berichten
    1.028
    Reputatie
    0
    Punten
    0,00
    Lid sinds
    Laatst gezien
    Super, werkt. Ik heb je wat punten gestuurd. smile
    0
    Berichten
    515
    Reputatie
    0
    Punten
    0,00
    Lid sinds
    Laatst gezien
    Vince schreef:
    Super, werkt. Ik heb je wat punten gestuurd. smile
    ok ty smilesmile
    * LOKJE???yummie*
    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