I've been playing around with php alot lately and started to scheme ways to
use it-lol

so heres what I tried to do:

first there is a switch statement:
switch($page) {

case "refer": require("some_file.php");
On that some_file.php I have an elseif like so:


if($page  == $refer)
$title = "Welcome to this website";
elseif($page == $somethingelse)
$title = "Something else than the other one";
$title ="the default";

Both these are included by:

Then on the page where thee are required I require them at the top of the
and I have this:
<title> echo "$title"; ?>
The first part of the if statement returns true always.

My question is why? Arent the variables $page and $refer etc passed over? Am
I going about this all wrong?
It doesnt work if even in the same file as the page and not in includes.

I thought that it didnt matter where we define variables in php, so I tried
to define the $title in the body of an html page but that didnt work

using php4

on windows and solaris

is there a way to get this type of variable from any predefined HTTP

so I tried

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to