Ik heb een php pagina met de volgende code;
Dit wordt weergeven als;
Quote:
1) Di-rect - Inside My Head
2) The Rolling Stones - Start Me Up
3) Adele - Set Fire To The Rain
4) Queen - Thank God Its Christmas
5) The Cardigans - My Favourite Game
Nou is het mijn bedoeling om het /ongeveer/ als volgt te krijgen;
Quote:
Di-rect - Inside My Head
_____________________________
The Rolling Stones - Start Me Up
_____________________________
Adele - Set Fire To The Rain
_____________________________
Queen - Thank God Its Christmas
_____________________________
The Cardigans - My Favourite Game
Kan iemand mij op weg helpen met de styling hiervan?
Was stiekem al trots dat er uberhaupt een output is gelukt
Alvast bedankt!
Justin
ps) even een blauwe kleur zodat het makkelijker onderscheiden kan worden
[COLOR= #0000BB]<?php
$conn[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]localhost[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]databasenaam[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tabel ORDER BY id DESC LIMIT 0,5"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$x[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$x[/COLOR][COLOR= #007700]+[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]) [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]artiest[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] - [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nummer[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$x[/COLOR][COLOR= #007700]++;
}[/COLOR]
?> Dit wordt weergeven als;
Quote:
1) Di-rect - Inside My Head
2) The Rolling Stones - Start Me Up
3) Adele - Set Fire To The Rain
4) Queen - Thank God Its Christmas
5) The Cardigans - My Favourite Game
Nou is het mijn bedoeling om het /ongeveer/ als volgt te krijgen;
Quote:
Di-rect - Inside My Head
_____________________________
The Rolling Stones - Start Me Up
_____________________________
Adele - Set Fire To The Rain
_____________________________
Queen - Thank God Its Christmas
_____________________________
The Cardigans - My Favourite Game
Kan iemand mij op weg helpen met de styling hiervan?
Was stiekem al trots dat er uberhaupt een output is gelukt

Alvast bedankt!
Justin
ps) even een blauwe kleur zodat het makkelijker onderscheiden kan worden


Succes nog