Variables are used for storing a values, like text strings, numbers or arrays. When a variable is declared, it can be used over and over again in your script. PLEASE be caution, for each HTML page, you can only declare ONE name of each variable. All variables in PHP start with a $ symbol. Try this one:
The Concatenation Operator..
There is only one string operator in PHP. The concatenation operator (.) is used to put two string values together. Try this one:
strlen() Function..
The strlen() function is used to return the length of a string. Let's try the following code to find the length of a string:
strpos() Function..
The strpos() function is used to search for character within a string. If a match is found, this function will return the position of the first match. If no match is found, it will return FALSE. Let's try if we can find the string "Everyone" in our string below. The output of the code will be :
The position of the string "Everyone" in the string is 3. The reason that it is 3 (and not 4), is that the first position in the string is 0, not 1.
.jpg)


0 comments:
Post a Comment