I Have an on air script. I want to show who now on air. I have this script:
<?php
putenv("TZ=Europe/Amsterdam");
$h = date('G');
$d = date('w');
// Sunday
if ($d == 0 && $h >= 0 && $h < 9) { // Show Runs From Midnight til 6am
$djname = 'Kick Radio'; //DJ Name
$show = 'Kick Non Stop'; // Show description
}
elseif ($d == 0 && $h >= 0 && $h < 10) { // Show Runs From Midnight til 6am
$djname = 'Kick Radio'; //DJ Name
$show = 'Sunday Morning Songs'; // Show description
}
elseif ($d == 0 && $h >= 10 && $h < 0) { // Show Runs From Midnight til 6am
$djname = 'Kick Radio'; //DJ Name
$show = 'Kick Non Stop'; // Show description
}
// Monday
if ($d == 1 && $h >= 0 && $h < 0) { // Show Runs From Midnight til 6am
$djname = 'Kick Radio'; //DJ Name
$show = 'Kick Non Stop'; // Show description
}
echo '<h3>'.$show.'</h3>';
But it didn't show something. Only the <h3>
tags. What's wrong with this code?