PHP Tution

Monday, March 24, 2014

Use of unset in PHP

If we declare any variable as unset then it will be undefined for the next part of the coding. See example :-


<?php
echo "<center>";

$a="Mahi";
$b="Piyu";
$c="Bhavna";

echo $a." ".$b." ".$c."<br/>";

unset($a,$b,$c);

echo $a;
echo $b;
echo $c;

echo "</center>";
?>

Output:-



Posted by MaHii Babariya at 7:30 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

MaHii Babariya
View my complete profile

Blog Archive

  • ▼  2014 (29)
    • ►  November (1)
    • ►  October (2)
    • ►  September (3)
    • ►  April (2)
    • ▼  March (21)
      • Simple sign up form in php using MySql.
      • OOPs in PHP :- Simple example of class
      • Use of unset in PHP
      • PHP Cookie
      • Simple example of SESSION in PHP
      • FILES method in PHP
      • REQUEST Method in PHP
      • POST Method in PHP
      • GET Method in PHP
      • Global Variable in PHP
      • User Defined Functions in PHP
      • Foreach loop example in PHP.
      • Example of Associate Array in PHP
      • Indexed Array in PHP.
      • PHP include..
      • PHP if else statement.
      • PHP Operators
      • Difference between single quotes and double quotes...
      • PHP Type Casting.
      • PHP Data Types
      • PHP Introduction
Picture Window theme. Powered by Blogger.