HTML TAGS IN PHP

<?php
$wishes = "Hello!";
echo $wishes;
echo "<h4>PHP and Html Heading !</h4>";
?>
Html Output:
Hello!
PHP and Html Heading !

PHP TUTOR variables rules

php variables rules

  1. It must start with a letter or underscore "_".
  2. Can be comprised of alpha-numeric characters and underscores. a-z, A-Z, 0-9, or _ .
  3. Variables with more than one word should be separated with underscores. $first_secondvariablename
  4. Variables with more than one word can also be distinguished with capitalization. $ItsMyName

PHP variable

$variable_name = Value;
Always Php Variables names are case-sensitive

<?php
$iamstring = "Hello World!";
$iam_number = 4;
$itsalsoNumber = 8;
?>

PHP Simple Tags Example

Php Extension is filename.php
<html>
<head>
<title>Php Example</title>
</head><body>
<?php echo "Hello World!"; ?>
</body>
</html>
OutPut Will be
hello World!

PHP PROGRAMMING shorthand support


PHP stands for PHP Hypertext Preprocessor.
<php
// php Codes
?>
Shorthand PHP tag that requires shorthand support to be enabled
on your server so that we can use <? instead of <?php
<
//with shorthand support
?>
<?php
//without shorthand support
?>