$array = [1, -20, 'tango', 'whiskey',];
/* echo $array[0]; // 1
* echo $array[1]; // -20
* echo $array[2]; // tango
* echo $array[3]; // whiskey
*/
$array = ['foo' => 'bar', 'baz' => 27,]
/* echo $array[0]; // bar
* echo $array[1]; // 27
* echo $array['foo']; // bar
* echo $array['baz']; // 27
*/
$opt = $_SERVER['QUERY_STRING'] ?? null;
if ($opt == 'all') {
$opt = null;
}
function l($link = 'all'): string
{
global $opt;
return $link != $opt ? " <a class='head' href='?$link'>[$link]</a>" : '';
}
echo 'Some Links:' . l() . l('link1') . l('link2') . l('link3');
/ip firewall address-list
add address=1.yyy.com list=allowed
add address=2.yyy.com list=allowed
/ip firewall filter
add action=reject chain=forward dst-address-list=!allowed protocol=tcp reject-with=tcp-reset src-address=%your_ip%
add action=drop chain=forward dst-address-list=!allowed protocol=udp src-address=%your_ip%