$message is var but $$message is ???????

$message is var but $$message is ???????

am 10.01.2008 11:05:42 von shror

Hi every body,

I have a really serious question which is what is the difference
between $message & $$message, I know the uses of $message which is the
assigning of a variables and for the forms POST & GET, but what is the
uses of $$mesage

also I have another Database question, Its a question I've been asked
in an interview but am just a beginner in DataBase, the question was
that:
Company need to create a DB once and do no more edits in the future on
the DB, the DB contains Category name, Sub-category, sub-sub-category

so this means three level tree how to create a DB using this hierarchy
and in the future if the sub-sub got another sub how could this be
done without the need of a DB designer??


Thanks so much for all help in advance

shror

Re: $message is var but $$message is ???????

am 10.01.2008 11:44:44 von colin.mckinnon

On 10 Jan, 10:05, shror wrote:
> Hi every body,
>
> I have a really serious question which is what is the difference
> between $message & $$message, I know the uses of $message which is the
> assigning of a variables and for the forms POST & GET, but what is the
> uses of $$mesage
>

$message='hello';
$hello='world';

print "$message $$message"; // writes "hello world"

print "$$hello"; // will give a warning because $world is not defined

> also I have another Database question, Its a question I've been asked
> in an interview but am just a beginner in DataBase, the question was
> that:
> Company need to create a DB once and do no more edits in the future on
> the DB, the DB contains Category name, Sub-category, sub-sub-category
>
> so this means three level tree how to create a DB using this hierarchy
> and in the future if the sub-sub got another sub how could this be
> done without the need of a DB designer??
>

Its trivial, there's lots of answers - but its way OT. Try asking in a
DB forum.

C.

Re: $message is var but $$message is ???????

am 10.01.2008 12:14:37 von Captain Paralytic

On 10 Jan, 10:05, shror wrote:
> also I have another Database question, Its a question I've been asked
> in an interview but am just a beginner in DataBase, the question was
> that:
> Company need to create a DB once and do no more edits in the future on
> the DB, the DB contains Category name, Sub-category, sub-sub-category
>
> so this means three level tree how to create a DB using this hierarchy
> and in the future if the sub-sub got another sub how could this be
> done without the need of a DB designer??
Take a look at:
http://del.icio.us/Captain_Paralytic/hierarchical

Re: $message is var but $$message is ???????

am 10.01.2008 12:30:29 von Michael Fesser

..oO(shror)

>I have a really serious question which is what is the difference
>between $message & $$message, I know the uses of $message which is the
>assigning of a variables and for the forms POST & GET, but what is the
>uses of $$mesage

It's called a variable variable. But there's hardly a reason to use
them. Usually you can achieve the same with an associative array.

Variable variables
http://www.php.net/manual/en/language.variables.variable.php

Micha