Re: "if" with blocks of text

From: Beauregard T. Shagnasty (a.nony.mous_at_example.invalid)
Date: 03/26/05


Date: Sat, 26 Mar 2005 00:33:04 -0500

Lee David wrote:
> 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

...
Look up "switch". Much cleaner code.

http://us3.php.net/manual/en/control-structures.switch.php

-- 
    -bts
    -This space intentionally left blank.


Relevant Pages

  • Re: calling a javascript alert from php
    ... Php cannot popup an alert like JavaScript. ... You can do that with Php, but clicking on must create a request to the server to display a new page with as a form or hyperlinks. ...
    (comp.lang.php)
  • Re: calling a javascript alert from php
    ... Php cannot popup an alert like JavaScript. ... You can do that with Php, but clicking on must create a request to the server to display a new page with as a form or hyperlinks. ...
    (comp.lang.php)
  • Re: calling a javascript alert from php
    ... Php cannot popup an alert like JavaScript. ... You can do that with Php, but clicking on must create a request to the server to display a new page with as a form or hyperlinks. ...
    (comp.lang.php)
  • Re: calling a javascript alert from php
    ... Php cannot popup an alert like JavaScript. ... You can do that with Php, but clicking on must create a request to the server to display a new page with as a form or hyperlinks. ...
    (comp.lang.php)
  • Re: calling a javascript alert from php
    ... Php cannot popup an alert like JavaScript. ... You can do that with Php, but clicking on must create a request to the server to display a new page with as a form or hyperlinks. ...
    (comp.lang.php)