01 | | 02 | | 03 | | 04 | | 05 | | 06 | | 07 | | 08 | | 09 | | 10 | | 11 | | 12 | | 13 | | 14 | | 15 | | 16 | | 17 | | 18 | | 19 | | 20 | | 21 | | 22 | | 23 | | 24 | | 25 | | 26 | | 27 | | 28 | | 29 | | 30 | | 31 | | 32 | | 33 | | 34 | | 35 | | 36 | | 37 | | 38 | | 39 | | 40 | | 41 | | 42 | | 43 | | 44 | | 45 | | 46 | | 47 | | 48 | | 49 | | 50 | | 51 | | 52 | | 53 | | 54 | | 55 | | 56 | | 57 | | 58 | | 59 | | 60 | | 61 | | 62 | | 63 | | 64 | | 65 | | 66 | | 67 | | 68 | | 69 | | 70 | | 71 | | 72 | | 73 | | 74 | | 75 | | 76 | | 77 | | 78 | | 79 | | 80 | | 81 | | 82 | | 83 | | 84 | | 85 | | 86 | | 87 | | 88 | | 89 | | 90 | | 91 | | 92 | | 93 | | 94 | | 95 | | 96 | | 97 | | 98 | | 99 | | 100 | | 101 | | 102 | | 103 | | 104 | | 105 | | 106 | | 107 | | 108 | | 109 | | 110 | | 111 | | 112 | | 113 | | 114 | | 115 | | 116 | | 117 | | 118 | | 119 | | 120 | | 121 | | 122 | | 123 | | 124 | | 125 | | 126 | | 127 | | 128 | | 129 | | 130 | | 131 | | 132 | | 133 | | 134 | | 135 | | 136 | | 137 | | 138 | | 139 | | 140 | | 141 | | 142 | | 143 | | 144 | | 145 | | 146 | | 147 | | 148 | | 149 | | 150 | | 151 | | 152 | | 153 | | 154 | | 155 | | 156 | | 157 | | 158 | | 159 | | 160 | | 161 | | 162 | | 163 | | 164 | | 165 | | 166 | | 167 | | 168 | | 169 | | 170 | | 171 | | 172 | | 173 | | 174 | | 175 | | 176 | | 177 | | 178 | | 179 | | 180 | | 181 | | 182 | | 183 | | 184 | | 185 | | 186 | | 187 | | 188 | | 189 | | 190 | | 191 | | 192 | | 193 | | 194 | | 195 | | 196 | | 197 | | 198 | | 199 | | 200 | | 201 | | 202 | | 203 | | 204 | | 205 | | 206 | | 207 | | 208 | | 209 | | 210 | | 211 | | 212 | | 213 | | 214 | | 215 | | 216 | | 217 | | 218 | | 219 | | 220 | | 221 | | 222 | | 223 | |
|
<?php
| /*---------------------------------------------------------------*/
| /*
| Titre : Départements français
|
| URL : https://phpsources.net/code_s.php?id=1003
| Date édition : 15 Fév 2019
| Date mise à jour : 07 Aout 2019
| Rapport de la maj:
| - refactoring du code en PHP 7
| - fonctionnement du code vérifié
| - correction du code
| - amélioration du code
| */
| /*---------------------------------------------------------------*/
|
| $dept = array(
| "01" => "Ain",
| "02" => "Aisne",
| "03" => "Allier",
| "04" => "Alpes de Haute Provence",
| "05" => "Hautes Alpes",
| "06" => "Alpes Maritimes",
| "07" => "Ardèche",
| "08" => "Ardennes",
| "09" => "Ariége",
| "10" => "Aube",
| "11" => "Aude",
| "12" => "Averyon",
| "13" => "Bouche du Rhà´ne",
| "14" => "Calvados",
| "15" => "Cantal",
| "16" => "Charente",
| "17" => "Charente Maritime",
| "18" => "Cher",
| "19" => "Corrèze",
| "2a" => "Corse du Sud",
| "2b" => "Haute Corse",
| "21" => "Cà´te d'Or",
| "22" => "Cà´tes d'Armor",
| "23" => "Creuse",
| "24" => "Dordogne",
| "25" => "Doubs",
| "26" => "Drà´me",
| "27" => "Eure",
| "28" => "Eure et Loire",
| "29" => "Finistère",
| "30" => "Gard",
| "31" => "Haute Garonne",
| "32" => "Gers",
| "33" => "Gironde",
| "34" => "Herault",
| "35" => "Ille et Vilaine",
| "36" => "Indre",
| "37" => "Indre et Loire",
| "38" => "Isère",
| "39" => "Jura",
| "40" => "Landes",
| "41" => "Loir et Cher",
| "42" => "Loire",
| "43" => "Haute Loire",
| "44" => "Loire Atlantique",
| "45" => "Loiret",
| "46" => "Lot",
| "47" => "Lot et Garonne",
| "48" => "Lozère",
| "49" => "Maine et Loire",
| "50" => "Manche",
| "51" => "Marne",
| "52" => "Haute Marne",
| "53" => "Mayenne",
| "54" => "Meurthe et Moselle",
| "55" => "Meuse",
| "56" => "Morbihan",
| "57" => "Moselle",
| "58" => "Nièvre;",
| "59" => "Nord",
| "60" => "Oise",
| "61" => "Orne",
| "62" => "Pas de Calais",
| "63" => "Puy de Dà´me",
| "64" => "Pyrenées Atlantiques",
| "65" => "Hautes Pyrenées",
| "66" => "Pyrenées orientales",
| "67" => "Bas Rhin",
| "68" => "Haut Rhin",
| "69" => "Rhà´ne",
| "70" => "Haute Saà´ne",
| "71" => "Saà´ne et Loire",
| "72" => "Sarthe",
| "73" => "Savoie",
| "74" => "Haute Savoie",
| "75" => "Paris",
| "76" => "Seine Maritime",
| "77" => "Seine et Marne",
| "78" => "Yvelines",
| "79" => "Deux Sèvres",
| "80" => "Somme",
| "81" => "Tarn",
| "82" => "Tarn et Garonne",
| "83" => "Var",
| "84" => "Vaucluse",
| "85" => "Vendée",
| "86" => "Vienne",
| "87" => "Haute Vienne",
| "88" => "Vosges",
| "89" => "Yonne",
| "90" => "Territoire de Belfort",
| "91" => "Essonne",
| "92" => "Hauts de Seine",
| "93" => "Seine Saint Denis",
| "94" => "Val de Marne",
| "95" => "Val d'Oise"
| );
|
| // Lecture de chaque ligne du tableau
| foreach($dept as $cle=>$valeur){
| echo $cle.' : '.$valeur.'<br>';
| }
|
| ?><?php
|
| $dept = array(
| "01" => "Ain",
| "02" => "Aisne",
| "03" => "Allier",
| "04" => "Alpes de Haute Provence",
| "05" => "Hautes Alpes",
| "06" => "Alpes Maritimes",
| "07" => "Ardèche",
| "08" => "Ardennes",
| "09" => "Ariége",
| "10" => "Aube",
| "11" => "Aude",
| "12" => "Averyon",
| "13" => "Bouche du Rhà´ne",
| "14" => "Calvados",
| "15" => "Cantal",
| "16" => "Charente",
| "17" => "Charente Maritime",
| "18" => "Cher",
| "19" => "Corrèze",
| "2a" => "Corse du Sud",
| "2b" => "Haute Corse",
| "21" => "Cà´te d'Or",
| "22" => "Cà´tes d'Armor",
| "23" => "Creuse",
| "24" => "Dordogne",
| "25" => "Doubs",
| "26" => "Drà´me",
| "27" => "Eure",
| "28" => "Eure et Loire",
| "29" => "Finistère",
| "30" => "Gard",
| "31" => "Haute Garonne",
| "32" => "Gers",
| "33" => "Gironde",
| "34" => "Herault",
| "35" => "Ille et Vilaine",
| "36" => "Indre",
| "37" => "Indre et Loire",
| "38" => "Isère",
| "39" => "Jura",
| "40" => "Landes",
| "41" => "Loir et Cher",
| "42" => "Loire",
| "43" => "Haute Loire",
| "44" => "Loire Atlantique",
| "45" => "Loiret",
| "46" => "Lot",
| "47" => "Lot et Garonne",
| "48" => "Lozère",
| "49" => "Maine et Loire",
| "50" => "Manche",
| "51" => "Marne",
| "52" => "Haute Marne",
| "53" => "Mayenne",
| "54" => "Meurthe et Moselle",
| "55" => "Meuse",
| "56" => "Morbihan",
| "57" => "Moselle",
| "58" => "Nièvre;",
| "59" => "Nord",
| "60" => "Oise",
| "61" => "Orne",
| "62" => "Pas de Calais",
| "63" => "Puy de Dà´me",
| "64" => "Pyrenées Atlantiques",
| "65" => "Hautes Pyrenées",
| "66" => "Pyrenées orientales",
| "67" => "Bas Rhin",
| "68" => "Haut Rhin",
| "69" => "Rhà´ne",
| "70" => "Haute Saà´ne",
| "71" => "Saà´ne et Loire",
| "72" => "Sarthe",
| "73" => "Savoie",
| "74" => "Haute Savoie",
| "75" => "Paris",
| "76" => "Seine Maritime",
| "77" => "Seine et Marne",
| "78" => "Yvelines",
| "79" => "Deux Sèvres",
| "80" => "Somme",
| "81" => "Tarn",
| "82" => "Tarn et Garonne",
| "83" => "Var",
| "84" => "Vaucluse",
| "85" => "Vendée",
| "86" => "Vienne",
| "87" => "Haute Vienne",
| "88" => "Vosges",
| "89" => "Yonne",
| "90" => "Territoire de Belfort",
| "91" => "Essonne",
| "92" => "Hauts de Seine",
| "93" => "Seine Saint Denis",
| "94" => "Val de Marne",
| "95" => "Val d'Oise"
| );
| ?>
|
| |
|
Invité
19 Oct 2021 à 09:56RIP ceux qui habitent en Corse
Invité
25 Jan 2020 à 19:06Tu as oublié les Dom (La Réunion) etc