Advertisement

Author Topic: PHP Help?  (Read 873 times)

0 Members and 1 Guest are viewing this topic.

allstar

  • Guest
PHP Help?
« 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"
}

?>



Like this post: 0

Adverstisement

tetrapod

  • Guest
Re: PHP Help?
« Reply #1 on: June 22, 2011, 11:07:50 AM »
Run it.  It will tell you if you are right or not.



Like this post: 0

 

Advertisements