Reply
Show different page depending on day of week.
Old 11-10-2004, 06:15 AM Show different page depending on day of week.
wvmlt's Avatar
Experienced Talker

Posts: 46
Is there a way to show different info on a page depending on what day of the week it is? Maybe an elseif statement that if its monday show X if tuesday show Y, etc.?
wvmlt is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 11-10-2004, 09:07 AM
Average Talker

Posts: 16
You could use the php function date() to return a three letter string of which day it is.

eg:

PHP Code:
<?php

$day 
date("D");

if (
strcmp($day"Mon") == 0) {
  echo 
"It's monday.";
} else if (
strcmp($day"Tue") == ) {
  echo 
"It's Tuesday.";
} else if (
strcmp($day"Wed") == 0) {
  echo 
"It's Wednesday.";
}

?>
You can look up the date() function at: http://www.php.net/date - it's a great site for php info.
dcs3jah is offline
Reply With Quote
View Public Profile
 
Old 11-10-2004, 09:10 AM
Skilled Talker

Posts: 73
Check out this thread.
http://forums.devshed.com/t200110/s....light=day+week
__________________
Find-A-Web-Host.com
Find-A-Web-Host is offline
Reply With Quote
View Public Profile Visit Find-A-Web-Host's homepage!
 
Reply     « Reply to Show different page depending on day of week.
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11502 seconds with 12 queries