Level 10.8 PHP Aufgabenbuch
Schreiben Sie Code, der die Komplexität des Passworts überprüft. Denken Sie sich die Komplexitätskriterien selbst aus.
Gegeben ist ein Array. Geben Sie alle Variationen der Permutationen der Elemente dieses Arrays auf dem Bildschirm aus.
Gegeben ist ein Formular mit zwei Inputs.
Beim Absenden des Formulars geben Sie
eine ul-Liste aller befreundeter Zahlen
aus dem Intervall aus, das durch die Werte
der Inputs festgelegt ist.
Angenommen, in einer Datei wird ein JSON von Städten im folgenden Format gespeichert:
{
[
"id": "1",
"city": "city1",
"country": "country1",
],
[
"id": "2",
"city": "city2",
"country": "country1",
],
[
"id": "3",
"city": "city3",
"country": "country2",
]
}
Angenommen, in einer Datei wird ein JSON von Ländern im folgenden Format gespeichert:
{
[
"id": "1",
"country": "country1",
],
[
"id": "2",
"country": "country2",
],
[
"id": "3",
"country": "country3",
]
}
Schreiben Sie ein Skript, das die Länder
durch ihre id ersetzt:
{
[
"id": "1",
"city": "city1",
"country_id": "1",
],
[
"id": "2",
"city": "city2",
"country_id": "1",
],
[
"id": "3",
"city": "city3",
"country_id": "2",
]
}