nummers scheiden met -

Gestart doorJoeryy18 reacties59 weergaven

19 berichten · pagina 2 van 2

Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rogier schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Rogier schreef:
ja, je kan het beter zo doen
[COLOR= #0000BB]<?php

$result[/COLOR] [COLOR= #007700]=[/COLOR] null[COLOR= #007700];[/COLOR]

[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]4[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++) {[/COLOR]
    [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700].= ([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]3[/COLOR][COLOR= #007700]) ?[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1000[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]9999[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]-[/COLOR] [COLOR= #007700]:[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1000[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]9999[/COLOR][COLOR= #007700]);
}[/COLOR]

Beter emo
Idd beter, omdat zoals hierboven vermeld is de andere manier soms niet werkt...

Nee, had tikkeltje aangepast zodat je geen dingen als dit krijgt: "12-3-6-736"
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lees aub het topic even door...
0
Joeryy

Lid · Topicstarter

Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Rogier schreef:
ja, je kan het beter zo doen
[COLOR= #0000BB]<?php

$result[/COLOR] [COLOR= #007700]=[/COLOR] null[COLOR= #007700];[/COLOR]

[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]4[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++) {[/COLOR]
    [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700].= ([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]3[/COLOR][COLOR= #007700]) ?[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1000[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]9999[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]-[/COLOR] [COLOR= #007700]:[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1000[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]9999[/COLOR][COLOR= #007700]);
}[/COLOR]

Beter emo
Werkt niet confused?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Doe aan het eind:
echo $result
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