Variable

Variable is an identify which is use to identify data value from memory and its value can be changed at run time.

Rule of declaration of variable

  • The first charater of variable name must be an alphabet.
  • It’s never allow any special charater Like:(-,*,.)
  • It’s allow under score (_)
  • It’s does not allow any blank space.
  • It’s allow digit but not at the begining.

Variable

Example in PHP
<?php

$a=2;
$str="string";

?>

Practice Questions

  • Input two number and print the sum.
  • Input two number and swap the number of value.
  • Input radius of circle and print it area.
  • Input temperature in Fahrenheit and print it Celsius value.

Leave a Comment

© 2014 Powered By