Time-based greeting script not working

  • Thread starter Thread starter yaboo
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
yaboo
Messages
4
Reaction score
0
script please help

PHP:
<?php
$time=date('H');
if($time<=10){
	$say='Hi';
}
else {
	$say='bye';
}
echo $say.'it is now '.date('H');
?>

it does not work,can u help me ?

TNX
 
Last edited:
Physics news on Phys.org
Edit: actually no, I think that was wrong.

Are you getting error messages? The code works fine on my machine.
 
Last edited: