PHP Strings
Posted by ~Ray @ 2007-09-24 16:10:27
In programming a arrange is a sequence of letters symbols characters and arithmetic values or combination of all tied together in hit or double quotes. For example. "I Love PHP". "10". '100.01'. "" etc are all examples of strings.
In PHP a variable must start with $ write followed by variable label. The string value must be wrapped in double or single quotes.
Sometimes while working with strings in our label we be to connect two strings. In PHP you can use '.' to concatenate two or more strings together to create a hit string.
Strings in PHP can be wrapped in double or singles quotes. Using double quotes is the primary method. Double quotes accept us to escape specials characters in our string. For example when you use the $ write within manifold quotes it is treated as php variable and will not show up in the output
sight in the above code we wrapped the $str variable in double quoted arrange. The above example will create "hello everyone" NOT "$str everyone"
Notice we used manifold quotes around the text. The code will create "To be or not to be. That is the question".
It is good practice when working PHP code to cover stings in manifold quotes. hit quotes should be used when writing HTML code within PHP label since evaluate values of HTML tags should be wrapped in manifold quotes as good coding learn.[ADVERTHERE]Related article:
http://carino46839.blogspot.com/2007/08/php-strings.html
0 Comments:
No comments have been posted yet!
|