Maar als je overal $datum[ . date("m/d/Y", strtotime($aFetch[datumVan])) . ] doet dan overschrijft ie dat steeds, dus je moet $datum[date("m/d/Y", strtotime($aFetch[datumVan]))][] gebruiken (dus met [] aan het einde), en als het het eerst element is (kun je checken met !isset($datum[date("m/d/Y", strtotime($aFetch[datumVan]))]) dan doe je er een array van maken, dus met $datum[date("m/d/Y", strtotime($aFetch[datumVan]))] = array(element)
Kleine Vragen Topic #1
Fatal error: Cannot use string offset as an array in /srv/scelsloo/www/wp.scouting-elsloo.nl/includes/classes/layout.class.php on line 491
Heb nu dit:
Heb nu dit:
[COLOR= #0000BB]<?php
$aQuery[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM activiteiten"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$datum[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]fetch[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aQuery[/COLOR][COLOR= #007700]))
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Y-m-d"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) ==[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Y-m-d"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumTot[/COLOR][COLOR= #007700]])))
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]][] =[/COLOR] [COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]<div style="border-top: 1px #FFF solid;"></div>[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br />[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beschrijving[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br /><em>Van [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000] tot [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumTot[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]</em>[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br />[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beschrijving[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br /><em>Van [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000] tot [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumTot[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]</em>[/COLOR][COLOR= #007700]);
}
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$tussenliggendeData[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]tussenliggendeDatums[COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Y-m-d"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])),[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Y-m-d"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumTot[/COLOR][COLOR= #007700]])));[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$tussenliggendeData[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$datum[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]//echo events[new Date(" . date("m/d/Y", strtotime($datum)) . ")] = new Event(" . $core->entities($aFetch[titel]) . <br /> . $core->entities($aFetch[beschrijving]) . <br /><em>Van . date("d-m-Y H:i", strtotime($aFetch[datumVan])) . tot . date("d-m-Y H:i", strtotime($aFetch[datumTot])) . </em>", "green");;[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]][] =[/COLOR] [COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]<div style="border-top: 1px #FFF solid;"></div>[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br />[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beschrijving[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br /><em>Van [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000] tot [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumTot[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]</em>[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000][/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m/d/Y"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br />[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beschrijving[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]<br /><em>Van [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumVan[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000] tot [/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d-m-Y H:i"[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strtotime"]strtotime[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datumTot[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]</em>[/COLOR][COLOR= #007700]);
}
}
}
}[/COLOR] Iemand die weet hoe ik uren bij een datum kan doen?
Dus bijvoorbeeld, om 19:45 moet hij een push notificatie sturen, na 12 uur weer, dan moet hij als hij een push notificatie verstuurd, de tijd van 19:45 12uur bijzetten. dus dan moet de tijd worden geupdate naar 7:45, en daarna weer naar 19:45
Dus bijvoorbeeld, om 19:45 moet hij een push notificatie sturen, na 12 uur weer, dan moet hij als hij een push notificatie verstuurd, de tijd van 19:45 12uur bijzetten. dus dan moet de tijd worden geupdate naar 7:45, en daarna weer naar 19:45
in date() functie strtotime gebruiken
php.net/ strtotime
php.net/ strtotime
Dankje! 

Hmm, hoe die ik dit,
als naam 1 10stemmen heeft
en naam 2 12stemmen heeft, hoe toon ik dan in mysql naam 2 bovenaan. Dit werkt niet
SELECT * FROM leden ORDER BY stemmen
als naam 1 10stemmen heeft
en naam 2 12stemmen heeft, hoe toon ik dan in mysql naam 2 bovenaan. Dit werkt niet
SELECT * FROM leden ORDER BY stemmen
wat werkt er niet aan dan?
behalve dat je nog DESC erachter moet zetten, of werkt t dan wel?
behalve dat je nog DESC erachter moet zetten, of werkt t dan wel?
ASC en DESC geprobeerd, ze blijven ongeordend 

Je moet wel de quotes om stemmen weghalen hea.
En als het dan nog niet is opgelost dan heb je er een varchar van gemaakt oid, dat moet een integer zijn.
toevoeging op 23 november 2012, 21:29:36:
SELECT naam, stemmen FROM leden ORDER BY stemmen DESC
dat dus, ook SELECT * moet je vermijden.
En als het dan nog niet is opgelost dan heb je er een varchar van gemaakt oid, dat moet een integer zijn.
toevoeging op 23 november 2012, 21:29:36:
SELECT naam, stemmen FROM leden ORDER BY stemmen DESC
dat dus, ook SELECT * moet je vermijden.
hij was int, de quotes moesten dus weg! thx 

Oh nice 

Afbeelding niet beschikbaarDe bron kon niet worden geladen (www.harrypotterrpg.nl).Bron openen ↗Kan iemand op het plaatje: Greenfield zetten? Vond het te klein om een nieuw topic aan te maken. Als je wilt krijg je er een vergoeding voor
Niet gewoon word-letters beetje fantasy style.toevoeging op 24 november 2012, 13:08:09:
Niemand

Is
Citaatnu echt deprecated? de een zecht van wel en de ander weer niet, en door welk HTML5 object kan ik die het beste vervangen?
Sevvlor schreef:Differences Between HTML 4.01 and HTML5IsEerdere citaten tonen
Citaatnu echt deprecated? de een zecht van wel en de ander weer niet, en door welk HTML5 object kan ik die het beste vervangen?
In HTML 4.01, the
Citaattag defines a long quotation.
In HTML5, theEerdere citaten tonen
Citaattag specifies a section that is quoted from another source.
Freestyle schreef:hij is dus niet verwijdert maar heeft een iets andere functie gekregen.Differences Between HTML 4.01 and HTML5Eerdere citaten tonen
Sevvlor schreef:IsEerdere citaten tonen
Citaatnu echt deprecated? de een zecht van wel en de ander weer niet, en door welk HTML5 object kan ik die het beste vervangen?
In HTML 4.01, theEerdere citaten tonen
Citaattag defines a long quotation.
In HTML5, theEerdere citaten tonen
Citaattag specifies a section that is quoted from another source.