Embed presentation
Download to read offline









![$GLOBALS[INDEX]
ď‚ PHP also stores all global variables in an array
called $GLOBALS[index].The index holds the
name of the variable.This array is also accessible
from within functions and can be used to update
global variables directly.](https://image.slidesharecdn.com/variables-150402121436-conversion-gate01/85/Variables-10-320.jpg)

This document discusses variables in PHP. It defines variables as containers that store information, with PHP variables starting with $ followed by a name. Rules for variable names in PHP are provided, which must start with a letter or underscore, cannot start with a number, and can only include alphanumeric characters and underscores. The document also discusses global vs local variables and how the static keyword can be used to prevent local variables from being deleted after a function is executed. It notes that all global variables are also accessible via the $GLOBALS array from within functions.









![$GLOBALS[INDEX]
ď‚ PHP also stores all global variables in an array
called $GLOBALS[index].The index holds the
name of the variable.This array is also accessible
from within functions and can be used to update
global variables directly.](https://image.slidesharecdn.com/variables-150402121436-conversion-gate01/85/Variables-10-320.jpg)