<?php
function e($k) {
     //  Element => array( id, Title, Link )
    $elements = array(
        'H'=>array(),
        'He'=>array(),
        'Li'=>array(),
        'Be'=>array(),
        'B'=>array(),
        'C'=>array(),
        'N'=>array(),
        'O'=>array(),
        'F'=>array(),
        'Ne'=>array(),
        'Na'=>array(),
        'Mg'=>array(),
        'Al'=>array(),
        'Si'=>array(),
        'P'=>array(),
        'S'=>array(),
        'Cl'=>array(),
        'Ar'=>array(),
        'K'=>array(),
        'Ca'=>array(),
        'Sc'=>array(),
        'Ti'=>array(),
        'V'=>array(),
        'Cr'=>array(),
        'Mn'=>array(),
        'Fe'=>array(),
        'Co'=>array(),
        'Ni'=>array(),
        'Cu'=>array(),
        'Zn'=>array(),
        'Ga'=>array(),
        'Ge'=>array(),
        'As'=>array(),
        'Se'=>array(),
        'Br'=>array(),
        'Kr'=>array(),
        'Rb'=>array(),
        'Sr'=>array(),
        'Y'=>array(),
        'Zr'=>array(),
        'Nb'=>array(),
        'Mo'=>array(),
        'Tc'=>array(),
        'Ru'=>array(),
        'Rh'=>array(),
        'Pd'=>array(),
        'Ag'=>array(),
        'Cd'=>array(),
        'In'=>array(),
        'Sn'=>array(),
        'Sb'=>array(),
        'Te'=>array(),
        'J'=>array(),
        'Xe'=>array(),
        'Cs'=>array(),
        'Ba'=>array(),
        'La'=>array(),
        'Hf'=>array(),
        'Ta'=>array(),
        'W'=>array(),
        'Re'=>array(),
        'Os'=>array(),
        'Ir'=>array(),
        'Pt'=>array(),
        'Au'=>array(),
        'Hg'=>array(),
        'Tl'=>array(),
        'Pb'=>array(),
        'Bi'=>array(),
        'Po'=>array(),
        'At'=>array(),
        'Ra'=>array(),
        'Fr'=>array(),
        'Ac'=>array(),
        'Ce'=>array(),
        'Pr'=>array(),
        'Nd'=>array(),
        'Pm'=>array(),
        'Sm'=>array(),
        'Eu'=>array(),
        'Gd'=>array(),
        'Tb'=>array(),
        'Dy'=>array(),
        'Ho'=>array(),
        'Er'=>array(),
        'Tm'=>array(),
        'Yb'=>array(),
        'Lu'=>array()
    );

        if (empty($k)) return '';
        else {
            if (array_key_exists($k, $elements)) print $k;
        }
    }
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PSE</title>
    <style type="text/css">
        #mjPSE_tbl {

        }
        #mjPSE_tbl td.mjPSE_element {
            border: #000000 1px solid;
            border-radius: 5px;
            padding: .5em;
            margin: .3em;
        }
    </style>
</head>
<body>

<table id="mjPSE_tbl">
    <tr> <!-- 1 -->
        <td class="mjPSE_element"><?=e('H');?></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td class="mjPSE_element"><?=e('He');?></td>
    </tr>
    <tr> <!-- 2 -->
        <td class="mjPSE_element"><?=e('Li');?></td>
        <td class="mjPSE_element"><?=e('Be');?></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td class="mjPSE_element"><?=e('B');?></td>
        <td class="mjPSE_element"><?=e('C');?></td>
        <td class="mjPSE_element"><?=e('N');?></td>
        <td class="mjPSE_element"><?=e('O');?></td>
        <td class="mjPSE_element"><?=e('F');?></td>
        <td class="mjPSE_element"><?=e('Ne');?></td>
    </tr>
    <tr> <!-- 3 -->
        <td class="mjPSE_element"><?=e('Na');?></td>
        <td class="mjPSE_element"><?=e('Mg');?></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td class="mjPSE_element"><?=e('Al');?></td>
        <td class="mjPSE_element"><?=e('Si');?></td>
        <td class="mjPSE_element"><?=e('P');?></td>
        <td class="mjPSE_element"><?=e('S');?></td>
        <td class="mjPSE_element"><?=e('Cl');?></td>
        <td class="mjPSE_element"><?=e('Ar');?></td>
    </tr>
    <tr> <!-- 4 -->
        <td class="mjPSE_element"><?=e('K');?></td>
        <td class="mjPSE_element"><?=e('Ca');?></td>
        <td class="mjPSE_element"><?=e('Sc');?></td>
        <td class="mjPSE_element"><?=e('Ti');?></td>
        <td class="mjPSE_element"><?=e('V');?></td>
        <td class="mjPSE_element"><?=e('Cr');?></td>
        <td class="mjPSE_element"><?=e('Mn');?></td>
        <td class="mjPSE_element"><?=e('Fe');?></td>
        <td class="mjPSE_element"><?=e('Co');?></td>
        <td class="mjPSE_element"><?=e('Ni');?></td>
        <td class="mjPSE_element"><?=e('Cu');?></td>
        <td class="mjPSE_element"><?=e('Zn');?></td>
        <td class="mjPSE_element"><?=e('Ga');?></td>
        <td class="mjPSE_element"><?=e('Ge');?></td>
        <td class="mjPSE_element"><?=e('As');?></td>
        <td class="mjPSE_element"><?=e('Se');?></td>
        <td class="mjPSE_element"><?=e('Br');?></td>
        <td class="mjPSE_element"><?=e('Kr');?></td>
    </tr>
    <tr> <!-- 5 -->
        <td class="mjPSE_element"><?=e('Rb');?></td>
        <td class="mjPSE_element"><?=e('Sr');?></td>
        <td class="mjPSE_element"><?=e('Y');?></td>
        <td class="mjPSE_element"><?=e('Zr');?></td>
        <td class="mjPSE_element"><?=e('Nb');?></td>
        <td class="mjPSE_element"><?=e('Mo');?></td>
        <td class="mjPSE_element"><?=e('Tc');?></td>
        <td class="mjPSE_element"><?=e('Ru');?></td>
        <td class="mjPSE_element"><?=e('Rh');?></td>
        <td class="mjPSE_element"><?=e('Pd');?></td>
        <td class="mjPSE_element"><?=e('Ag');?></td>
        <td class="mjPSE_element"><?=e('Cd');?></td>
        <td class="mjPSE_element"><?=e('In');?></td>
        <td class="mjPSE_element"><?=e('Sn');?></td>
        <td class="mjPSE_element"><?=e('Sb');?></td>
        <td class="mjPSE_element"><?=e('Te');?></td>
        <td class="mjPSE_element"><?=e('J');?></td>
        <td class="mjPSE_element"><?=e('Xe');?></td>
    </tr>
    <tr> <!-- 6 -->
        <td class="mjPSE_element"><?=e('Cs');?></td>
        <td class="mjPSE_element"><?=e('Ba');?></td>
        <td class="mjPSE_element"><?=e('La');?></td>
        <td class="mjPSE_element"><?=e('Hf');?></td>
        <td class="mjPSE_element"><?=e('Ta');?></td>
        <td class="mjPSE_element"><?=e('W');?></td>
        <td class="mjPSE_element"><?=e('Re');?></td>
        <td class="mjPSE_element"><?=e('Os');?></td>
        <td class="mjPSE_element"><?=e('Ir');?></td>
        <td class="mjPSE_element"><?=e('Pt');?></td>
        <td class="mjPSE_element"><?=e('Au');?></td>
        <td class="mjPSE_element"><?=e('Hg');?></td>
        <td class="mjPSE_element"><?=e('Tl');?></td>
        <td class="mjPSE_element"><?=e('Pb');?></td>
        <td class="mjPSE_element"><?=e('Bi');?></td>
        <td class="mjPSE_element"><?=e('Po');?></td>
        <td class="mjPSE_element"><?=e('At');?></td>
        <td class="mjPSE_element"><?=e('Ra');?></td>
    </tr>
    <tr> <!-- 7 -->
        <td class="mjPSE_element"><?=e('Fr');?></td>
        <td class="mjPSE_element"><?=e('Ra');?></td>
        <td class="mjPSE_element"><?=e('Ac');?></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr> <!-- 8 -->
        <td></td>
        <td></td>
        <td class="mjPSE_element"><?=e('Ce');?></td>
        <td class="mjPSE_element"><?=e('Pr');?></td>
        <td class="mjPSE_element"><?=e('Nd');?></td>
        <td class="mjPSE_element"><?=e('Pm');?></td>
        <td class="mjPSE_element"><?=e('Sm');?></td>
        <td class="mjPSE_element"><?=e('Eu');?></td>
        <td class="mjPSE_element"><?=e('Gd');?></td>
        <td class="mjPSE_element"><?=e('Tb');?></td>
        <td class="mjPSE_element"><?=e('Dy');?></td>
        <td class="mjPSE_element"><?=e('Ho');?></td>
        <td class="mjPSE_element"><?=e('Er');?></td>
        <td class="mjPSE_element"><?=e('Tm');?></td>
        <td class="mjPSE_element"><?=e('Yb');?></td>
        <td class="mjPSE_element"><?=e('Lu');?></td>
        <td></td>
        <td></td>
    </tr>
</table>

</body>
</html>