wesleypipes Posted November 5, 2006 Share Posted November 5, 2006 <?phpecho date("d-m-y H:i:s", time());$hours = date("G"); //24 hour time without leading zeros. eg. 0 or 23if($hours >= 22 && $hours <= 3){echo "My your up late arn't you!";}elseif($hours >= 4 && $hours <= 7){echo "My your up rather early!";}elseif($hours >= 8 && $hours <= 12){echo "Good morning, and how are we today?";}elseif($hours >= 13 && $hours <= 17){echo "<table align = center>"Good afternoon, are we having a nice day?";}elseif($hours >= 18 && $hours <= 21){echo "Good evening, hope you had a nice day.";}?>Hi, i would like to know how id format the date to be displayed in the middle of page and how would i go about putting tags around say, 'echo "Good evening, hope you had a nice day.";' to edit it. Basically, i just need to know the correct use of tags in formattiing eg bold text, centered etcthanks Link to comment https://forums.phpfreaks.com/topic/26232-how-would-i-use-html-tags-to-format-the-below-code-s/ Share on other sites More sharing options...
Stooney Posted November 5, 2006 Share Posted November 5, 2006 you just throw it in.[code]echo "<b>Hello everyone</b>"; //would make 'hello everyone' bold[/code]you can just throw all html tags in with echo. Link to comment https://forums.phpfreaks.com/topic/26232-how-would-i-use-html-tags-to-format-the-below-code-s/#findComment-119988 Share on other sites More sharing options...
sasa Posted November 5, 2006 Share Posted November 5, 2006 btw statement '$hours >= 22 && $hours <= 3' is newer true Link to comment https://forums.phpfreaks.com/topic/26232-how-would-i-use-html-tags-to-format-the-below-code-s/#findComment-120045 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.