View Full Version : Strings in php?

02-26-2012, 03:47 PM
I again got a doubt regarding strings I was viewing a example of php script which was using two different kind of string one with single quotes and other with double quote.So can anybody please tell me what is difference between single quoted and double quoted strings. please...

02-26-2012, 03:57 PM
Basically their is one difference in single quoted and double quoted string it is that single quoted strings are not parsed whereas double quoted strings are parsed before echo.

02-27-2012, 04:53 PM
Is it the only difference between these two types of strings can you please give some example how I should use them.

03-05-2012, 05:48 PM
In PHP there is not a specific way to define variable like Integer, Float, Double or String. In PHP you can declare a variable using $ sign. For Example
Syntax: $variable_name=[value_of_variable];
Example: $username="Alex";

03-12-2012, 11:51 PM
Thanks for bro for trying to helping me with string matter but I already know how a variable is declared in php but what I wanted to know whether there is any difference in single quoted string and double quoted strings.I think Thecreator difference is the only one which make these string different.If anybody knows of any other difference please let me know.

03-31-2012, 07:33 PM
If you have to create a string variable in php then you have to simply declare a string variable using the dollar sing with the name of that variable. Like