list / explode

Gestart doorOne2xs5 reacties41 weergaven

6 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
ik heb dit:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/list"]list[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$voor[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$time[/COLOR][COLOR= #007700]) =[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000],[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$time[/COLOR][COLOR= #007700]);[/COLOR] ?>


en dan wil ik de waarde van $time hebben maar het probleem als ik 0,1 hebt is $time 2confused maard at moet 1 hoe los ik dit op?

EDIT:
of ligt het aan de query?

[COLOR= #0000BB]<?php[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][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]"UPDATE flood SET time = time + "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$time[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE ip = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND name = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/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][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO flood (ip, time, time_add, name) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$time[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$now[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]")"[/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]
?>
0
Berichten
1.245
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ben niet heel erg slim hoor maar volgens mij is het een soort wiskunde!

0,1=2
0,1:2=0,05

Dus als je dat 0,05 in zou vullen zou je 1 moeten hebben.
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
@roots 0.05 wordt 10
0
Berichten
1.245
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
@roots 0.05 wordt 10
Hmm dus als je het getal verlaagt word het hoger?
Maar als je het getal verhoogt zou ie lager moeten worden?
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Probeer dit es

[COLOR= #0000BB]<?php
$exp[/COLOR] [COLOR= #007700]=[/COLOR][URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000],[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$time[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Voor = $exp[0]
// Time = $exp[1][/COLOR]
?>
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
dat is het zelfde alleen dan is het een array
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