Les avertissements suivants se sont produits :
Warning [2] Undefined array key 0 - Line: 1640 - File: showthread.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 1640 errorHandler->error_callback
/showthread.php 915 buildtree




Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
[Résolu] La géolocalisation a échouée... CGGoogleMap
#26
Citation :According to the documentation ksort() always returns a boolean and the array is modified by reference. You could assign the result of ksort() to a unused variable and use the array for your output like this.

{$tmp = ksort($var)}
{$var}


J'ai testé {$var|ksort} et j'ai une erreur.
Il faut créer la référence de tri avant le foreach pour que ça fonctionne.
En fait y'a pas de fonction à créer, juste à stocker dans une variable ($temp) la condition de tri avant d'effectuer la boucle.


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)