Page 1 of 1

Basic PHP help!

Posted: Mon Jan 19, 2009 4:59 pm
by satl
I have searched for hours, trying to figure this out. Please help me. I barely understand PHP.

I want to have a php page that contains all the variables, so I'm guess it would look something like this, I'm not really sure:

<body>
<?php
$var1 = 10;
$var2 = 4;
$var3 = 7;
$var4 = Hello World;
?>
</body>


Then, I simply want to display those variables on another php page. Could you tell me what exactly is the code I need to display one of the above written variables?

Thanks, Shane

Re: Basic PHP help!

Posted: Mon Jan 19, 2009 5:27 pm
by it2051229
there are a lot of tutorials of PHP... type it in google...

Code: Select all

 
<body>
<?php
$var1 = 10;
$var2 = 4;
$var3 = 7;
$var4 = Hello World; 
 
print $var1;
echo $var2;
print $var3;
echo $var4;
?>
</body>
 

Re: Basic PHP help!

Posted: Mon Jan 19, 2009 5:29 pm
by satl
it2051229 wrote:... type it in google...
Maybe easy for you, but I've been there, and done that for over 2 hours!

I got it now though. Thanks!

Shane

Re: Basic PHP help!

Posted: Mon Jan 19, 2009 5:38 pm
by it2051229
yeah.. just type it in google .. "PHP TUTORIAL"