Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

variables in php

<?php
  # To declare variables in php, you should prefix the variable name with
  # a dollar sign and assign it the value. For example:
  $msg = 'Hello World';
  $number = 10;
  $decimal = 98.6;
  $result = true;

  # To print out variable names, you can directly enter the variable name
  # inside of a print or echo statement. For example:
  echo "Variables: $msg, $number, $decimal, $result"
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #variables #php
ADD COMMENT
Topic
Name
4+3 =