Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>PHP Variables</title>
- <style>
- table, th, td {
- border: 1px solid black;
- }
- </style>
- <?php
- $myint = 5;
- $myDouble = 3.234;
- $myString = "Hello";
- $myBool = true;
- ?>
- </head>
- <body>
- <table style="width:100%">
- <tr>
- <th>Name </th>
- <th>Type </th>
- <th>Example </th>
- <th>Description </th>
- </tr>
- <tr>
- <th>$myInt </th>
- <th><?php echo gettype($myint); ?> </th>
- <th><?php echo $myint ?> </th>
- <th>A Whole Number </th>
- </tr>
- <tr>
- <th>$myDouble </th>
- <th><?php echo gettype($myDouble); ?> </th>
- <th><?php echo $myDouble ?> </th>
- <th>A Floating Point Number </th>
- </tr>
- <tr>
- <th>$myString </th>
- <th><?php echo gettype($myString); ?> </th>
- <th><?php echo $myString ?> </th>
- <th>A Collection of characters </th>
- </tr>
- <tr>
- <th>$myBool </th>
- <th><?php echo gettype($myBool); ?> </th>
- <th><?php echo $myBool ?> </th>
- <th>One of the special values true or false</th>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement