Remove usages of 'each', as it is deprecated in php 7.2
[plcapi.git] / demo / server / server.php
index b18cf46..1af2554 100644 (file)
@@ -351,7 +351,7 @@ function ageSorter($req)
     // hack, must make global as uksort() won't
     // allow us to pass any other auxiliary information
     uksort($agesorter_arr, 'agesorter_compare');
-    while (list($key, $val) = each($agesorter_arr)) {
+    foreach($agesorter_arr as $key => $val) {
         // recreate each struct element
         $v[] = new Value(
             array(