"if" with blocks of text
From: Lee David (affordable_turnkey_solutions_at_comcast.net)
Date: 03/26/05
- Previous message: roger: "Re: user online offline session"
- Next in thread: Beauregard T. Shagnasty: "Re: "if" with blocks of text"
- Reply: Beauregard T. Shagnasty: "Re: "if" with blocks of text"
- Reply: Cujo: "Re: "if" with blocks of text"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Mar 2005 20:11:03 -0600
I would like to have PHP decide which block of text to display on the web
page. I'm doing this in javascript now, but think PHP could do it a little
cleaner. I saw once (and can't find again) something like this:
<?php
$date = getdate();
$dow = $date["wday"];
if ($dow == 0)
{
?>
Sunday text goes here
<?php
}
if ($dow == 1)
{
?>
Monday text goes here
I don't want to put it into variables and use echo as it is quite large. I
pre-load a weeks worth of stuff and display different stuff each day.
BTW, I did go to the www.php.com web site and looked for it under "if" and
"alternative syntax".
TIA,
Jer
- Previous message: roger: "Re: user online offline session"
- Next in thread: Beauregard T. Shagnasty: "Re: "if" with blocks of text"
- Reply: Beauregard T. Shagnasty: "Re: "if" with blocks of text"
- Reply: Cujo: "Re: "if" with blocks of text"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|