Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <title>PHP Variables</title>
  5.  
  6. <style>
  7. table, th, td {
  8. border: 1px solid black;
  9. }
  10. </style>
  11.  
  12. <?php
  13. $myint = 5;
  14. $myDouble = 3.234;
  15. $myString = "Hello";
  16. $myBool = true;
  17.  
  18. ?>
  19. </head>
  20. <body>
  21.  
  22. <table style="width:100%">
  23. <tr>
  24. <th>Name </th>
  25. <th>Type </th>
  26. <th>Example </th>
  27. <th>Description </th>
  28. </tr>
  29.  
  30. <tr>
  31. <th>$myInt </th>
  32. <th><?php echo gettype($myint); ?> </th>
  33. <th><?php echo $myint ?> </th>
  34. <th>A Whole Number </th>
  35. </tr>
  36.  
  37. <tr>
  38. <th>$myDouble </th>
  39. <th><?php echo gettype($myDouble); ?> </th>
  40. <th><?php echo $myDouble ?> </th>
  41. <th>A Floating Point Number </th>
  42. </tr>
  43.  
  44. <tr>
  45. <th>$myString </th>
  46. <th><?php echo gettype($myString); ?> </th>
  47. <th><?php echo $myString ?> </th>
  48. <th>A Collection of characters </th>
  49. </tr>
  50.  
  51. <tr>
  52. <th>$myBool </th>
  53. <th><?php echo gettype($myBool); ?> </th>
  54. <th><?php echo $myBool ?> </th>
  55. <th>One of the special values true or false</th>
  56. </tr>
  57.  
  58. </table>
  59. </body>
  60. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement