PHP Strings
0 5347
PHP Strings is very interesting part in PHP. A PHP String is a series of characters, where character is same as byte.
See Some Example for get more knowledge:
a) PHP String Length Function
The PHP strlen() function returns the length of string.<?php
echo strlen("Hello India!!");
?>
Result: 13b) PHP String Position Function
The strpos() function is used to search for a string or any character into a string.<?php
echo strpos("Hello ontime","ontime");
?>
Result: 6c) PHP String - Replace text
The PHP str_replace() function replace characters with other characters into the string.<?php
echo str_replace("World", "Asia", "Hello World");
?>
Result: Hello Asia
// (In this example through PHP String Replace Text, World replaces with AsiaRecommended Topic: PHP Functions
Share:





Comments
Waiting for your comments