PebHmong Discussion Forum

Hobbies & Interests => Computer & Technology => Topic started by: allstar on June 21, 2011, 01:43:36 PM

Title: PHP Help?
Post by: allstar on June 21, 2011, 01:43:36 PM
So I'm new at this stuff and trying to learn on my own.  Any help/suggestions would gladly be appreciated.  Just a heads up - I am only a beginner.

So this is what I'm trying to do:

write a program that checks the following:

Is the integer 4 equal to the string "4"?

print out "X is equal to Y" (or "X is NOT equal to Y") where X and Y are the values being tested.

This is what I have. I know this is very basic.

<?php

$x=4;
$y="4";

if ($x==$y)

{
   echo "X is equal to Y"
else
   echo "X is NOT equal to Y"
}

?>
Title: Re: PHP Help?
Post by: tetrapod on June 22, 2011, 11:07:50 AM
Run it.  It will tell you if you are right or not.