Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php echo "<h1>Hello world!</h1>"; ?>
- <?php echo "Welcome to <b>Penn State</b>!<br>";
- echo "We are <span style=\"color:red\"> Penn State</span>! <br>";
- $x = 5;
- $pi = 3.14;
- $foo = True;
- $name = "George";
- $Name = "Sarah";
- //$x is casted to a string
- echo "x is $x<br>";
- echo "pi is $pi<br>";
- echo "name is \"$name\"<br>";
- echo "name is \"$Name\"<br>";
- $z = $x + $pi;
- $z1 = $x * $pi;
- echo "z is $z<br>";
- echo "z1 is $z1<br>";
- if ($x>$pi)
- {
- echo "x is greater than pi<br>";
- }
- else
- {
- echo "x is smaller than pi<br>";
- }
- if ($x==$pi)
- {
- echo "x is equal to pi<br>";
- }
- else
- {
- echo "x is not equal to pi<br>";
- }
- echo "Today is: ".date("m/d/y")."<br>";
- echo "a random number in [1,10]: ".rand(1,10)."<br>";
- echo "The length of string \"name\" is ".strlen($name);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement