english

learn php

learn css

learn html

learn javascript

learn php

5. multiple conditions & arrays

solution 5.3
3 minutes / 593 words

five / solution 5.3

<?php

$book = [];

// Sharon Wu
$book["Sharon Wu"] = [
    "nickname" => ["woozie", "shar"],
    "pronouns" => "she/they",
    "birthdate" => 654359400,
    "address" => [
        "home" =>
            "126 Main Street\nPhiladelphia, PA 19127\nUnited States of America",
    ],
    "email" => ["work" => "[email protected]"],
    "phone" => ["work" => "+1.234.567.8901"],
    "url" => [
        "work" => "https://php.org/sharon.wu",
    ],
    "socials" => [
        "instagram" => "@php.sharon.wu",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Lori Kim
$book["Lori Kim"] = [
    "nickname" => ["lor", "pookie"],
    "pronouns" => "she/her",
    "birthdate" => 774196200,
    "address" => [],
    "email" => ["work" => "[email protected]"],
    "phone" => ["work" => "+1.234.567.8901"],
    "url" => [
        "work" => "https://php.org/lori.kim",
    ],
    "socials" => [
        "instagram" => "@php.lori.kim",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Disha Wish
$book["Disha Wish"] = [
    "nickname" => ["star"],
    "pronouns" => "she/they",
    "birthdate" => 866471400,
    "address" => [],
    "email" => [
        "work" => "[email protected]",
        "home" => "[email protected]",
    ],
    "phone" => ["work" => "+1.234.567.8901"],
    "url" => [
        "work" => "https://php.org/disha.wish",
    ],
    "socials" => [
        "instagram" => "@php.disha.wish",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Emily Barnes
$book["Emily Barnes"] = [
    "nickname" => ["adoorable", "stable"],
    "pronouns" => "they/them",
    "birthdate" => 1075476600,
    "address" => [
        "home" =>
            "6200 University Boulevard\nVancouver, BC V6T 1Z4\nCanada",
    ],
    "email" => [
        "work" => "[email protected]",
        "home" => "[email protected]",
    ],
    "phone" => ["work" => "+1.234.567.8901"],
    "url" => [
        "work" => "https://php.org/emily.barnes",
    ],
    "socials" => [
        "instagram" => "@php.emily.barnes",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Evelyn Silk
$book["Evelyn Silk"] = [
    "nickname" => ["smoothie", "eve"],
    "pronouns" => "they/she",
    "birthdate" => 630516600,
    "address" => [
        "home" =>
            "1 rue Victor Cousin\n75005 Paris\nFrance",
    ],
    "email" => [
        "work" => "[email protected]",
        "home" => "[email protected]",
    ],
    "phone" => ["work" => "+33.234.567.8901"],
    "url" => [
        "work" => "https://php.org/evelyn.silk",
    ],
    "socials" => [
        "instagram" => "@php.evelyn.silk",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Ava Machs
$book["Ava Machs"] = [
    "nickname" => ["pads"],
    "pronouns" => "she/they",
    "birthdate" => 600535800,
    "address" => [
        "home" =>
            "99 Shangda Road\nBaoshan District, Shanghai 200444\nChina",
    ],
    "email" => [
        "work" => "[email protected]",
        "home" => "[email protected]",
    ],
    "phone" => ["work" => "+86.234.567.8901"],
    "url" => [
        "work" => "https://php.org/ava.machs",
    ],
    "socials" => [
        "instagram" => "@php.ava.machs",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Harper Wren
$book["Harper Wren"] = [
    "nickname" => ["wrinkle", "birdie"],
    "pronouns" => "they/them",
    "birthdate" => 946567800,
    "address" => [
        "home" =>
            "80 Wellington Street\nOttawa, ON K1A 0A2\nCanada",
    ],
    "email" => [
        "work" => "[email protected]",
        "home" => "[email protected]",
    ],
    "phone" => ["work" => "+1.234.567.8901"],
    "url" => [
        "work" => "https://php.org/harper.wren",
    ],
    "socials" => [
        "instagram" => "@php.harper.wren",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Mia Lynx
$book["Mia Lynx"] = [
    "nickname" => ["furry"],
    "pronouns" => "they/it",
    "birthdate" => 1005147000,
    "address" => [
        "home" =>
            "Nueva Tajamar 481\nTorre Norte, Las Condes, Santiago\nChile",
    ],
    "email" => [
        "work" => "[email protected]",
        "home" => "[email protected]",
    ],
    "phone" => ["work" => "+56.234.567.8901"],
    "url" => [
        "work" => "https://php.org/mia.lynx",
    ],
    "socials" => [
        "instagram" => "@php.mia.lynx",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Sophie Koh
$book["Sophie Koh"] = [
    "nickname" => ["kodiak"],
    "pronouns" => "she/they",
    "birthdate" => 1049470200,
    "address" => [
        "home" =>
            "1 Zmora Street\nJerusalem, 9515701\nIsrael",
    ],
    "email" => ["work" => "[email protected]"],
    "phone" => ["work" => "+972.234.567.8901"],
    "url" => [
        "work" => "https://php.org/sophie.koh",
    ],
    "socials" => [
        "instagram" => "@php.sophie.koh",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

// Isla White
$book["Isla White"] = [
    "nickname" => ["scottie", "black"],
    "pronouns" => "she/her",
    "birthdate" => 1062426600,
    "address" => [],
    "email" => ["work" => "[email protected]"],
    "phone" => ["work" => "+1.234.567.8901"],
    "url" => [
        "work" => "https://php.org/isla.white",
    ],
    "socials" => [
        "instagram" => "@php.isla.white",
    ],
    "created" => 3155772600,
    "updated" => 3155772600,
    "notes" => "",
];

learn php

learn css

learn html

learn javascript

powered by akelei. an avi sato project.