Welcome visitors of MIC Computer

Welcome to my blog. With this blog you can post your question about computer and programming for absolutely free (free consultation sponsored by MIC Computer).. Well what are you waiting for just feel free to post your question or share with me about your computer / programming experience

Thursday, September 29, 2011

PHP Variable

PHP also have a variable to store temporary data. Just like Javascript variable, PHP variable can store anykind of data in 1 variable. For example, you can store 234 (number) in a variable and then change it to "Hello" (string) later.
PHP have some rule if you want to declare a variable:

  1. a name must start with letter or underscore "_"
  2. a variable name must contain only alpha-numeric characters or underscore (a-z, A-Z, 0-9, _ )
  3. we cannot use space for variable name but we can use _ or with capitalization ($my_var or $myVar) 
  4. php variable is case sensitive

1 comment:

Tom said...

I read your article..nice post..thanks..

seo hawaii