Monday, February 7, 2011

Exploring data types in PHP: Strings

in my early post we looked about variables in PHP. Now we know what variables are and how to assign variables in PHP. Now let we talk about strings.
String is a data type in PHP. Normally string holds name and other Alfa numeric values.
In PHP string can be define in “ “ (Double quotes) or ‘  ‘ (Single quotes). But double quotes are a good practice.
Lets see this simple example for strings:


In browser, its Looks like this :

5 comments: