Jump to content

[SOLVED] defining variables within IF statements


fatalkaiser

Recommended Posts

Can it be done? Ive been searching the net for ages looking for tutorials or examples and i cant find anything

 

What im trying to do is something like this

 

<?

if ($variable == "blah")

{

$a = 1;

$b = 2;

$c = 3;

};

{

echo ($e . $f . $g);

};

?>

 

Ive tried about a hundred different ways of doing it, but none of them print the three variables.

 

Can someone tell me what im doing wrong or give me the correct coding for this?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.