Building navigation structure for multiple users by adding values to multiple arrays at once
It works and I can't see any side effects, but it is unusual to see code like this, and I am not sure of the point of creating all 3 user arrays at once. 

Do you intend to display all 3 user menu options at the same time, or can only 1 user be logged in at once?

This is my preference for readability, also if you create a menu array and need items in a different order for different users, it would be difficult to achieve using the current code.

&lt;?php

function build_menu($user)
{
    // ### clearly show what each test is and what menu options are being set
    $menu = array();

    if ($user == 'Al') {
        $menu[] = array(
            "link" =&gt; "/admin.php",
            "text" =&gt; "Admin Login",
            "icon" =&gt; "wp.png");
    }

    if (in_array($user, array('Bob', 'Chris'))) {
        // menu options for multiple users can use in_array test
    }

    // default menu options for all users
    $menu[] = array(
        "link" =&gt; "/Wordpress/wp-login.php",
        "text" =&gt; "Login to Wordpress",
        "icon" =&gt; "wp.png");

    $menu[] = array(
        "link" =&gt; "/Gallery/Login.php",
        "text" =&gt; "Login to Gallery",
        "icon" =&gt; "picutres.jpg");

    return $menu;
}


function userbox($heading, $contents)
{
    // ### contents is supposed to be an array, why test it for being a blank string?
    // ### use {} to show scope
    if ($contents == "") {
        return;
    }

    // ### escape heading, what if it has html chars
    echo "&lt;div class=\"refbox\"&gt;

            &lt;h2&gt;" . htmlspecialchars($heading). "&lt;/h2&gt;
            &lt;p&gt;";

    /// ### think about your variable naming, $contents is actually menu items
    /// ### and $key is ambiguous, key of what?
    /// ### what if you used foreach ($menu_items as $menu_item) {

    foreach ($contents as $key) {

        // ### use {} around if statements, it is easier to see the scope of what is effected
        // ### use not empty instead of != "", that way if an array key doesn't exist like the 'updated' key below, your program won't generate a warning
        // ### use single quotes if you don't want to escape every double quote

        // if($key['link']!="")echo "&lt;a href=\"".$key['link']."\"&gt;";
        if (!empty($key['link'])) {
            echo '&lt;a href="' . $key['link'] . '"&gt;';
        }

        // ### i have given an example above, I will leave these ones for you to change
        if($key['icon']!="")echo"&lt;img src=\"/images/icons/".$key['icon']."\" alt=\"".$key['text']."\" class=\"icons\"&gt;";

        // ### escape html incase there are special characters
        // echo $key['text'];
        echo htmlspecialchars($key['text']);

        if($key['link']!="")echo "&lt;/a&gt;";
        if($key['updated']!="")echo " &lt;span style=\"float:right;\"&gt;(".$key['updated'][0].")&lt;/span&gt;";
        echo "&lt;br&gt;";
    }
    echo "&lt;/p&gt;
        &lt;/div&gt;";
}

$user = 'Al';
$menu = build_menu($user);
userbox($user, $menu);