In this tutorial we will learn about Strings in PHP. String are commonly described as collection of character. Mean a string is collection of number, alphabets or special symbols for example "Hello Word". In PHP you can define string in program with two ways by using single quotes(' ') or by using double(" ") quotes. In this tutorial we learn about strings, basic functions in strings, escape-sequence and difference between single and double quote string.
Differenene between Single and Double Quote Strings: As I said we can write strings in PHP in both single and double quotes. But there is certain difference between both. If you write string in single quotes it will take string literally. Suppose you have a variable $num=10; and if you weirte somthing like this 'Value of num=$num'. In this case it will show exactly the same. But if you will wite this in double quotes the variable name will changed with its value. To understand it more clearly follow the given example.