Created
March 15, 2019 17:13
-
-
Save technosmarter/6f6b8d39aae7922e83458d8d8cc91d93 to your computer and use it in GitHub Desktop.
PHP String Function examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The strinng functions work on String . String functions are various type of function . | |
String Functions In php - | |
strlen() Find out the string length | |
<?php | |
echo strlen("Learn PHP "); // outputs 9 | |
?> | |
Str_words_count() How many words in a string | |
PHP strrev() Reverse the string. | |
str_replace() Replace a part of a string with other string . | |
strpos() find out the position of search string. | |
strcmp() compare two string | |
strtolower() covert capital string to lower case . | |
strtoupper() covert lower case string to upper case . | |
These string function used like as | |
<?php | |
echo strlen("Learn PHP "); // outputs 9 | |
?> | |
For compelete reference review the comment below . | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All string functions are included in PHP Tutorials for website development.
Str_words_count()
PHP strrev()
str_replace()
strpos()
strcmp()
strtolower()
strtoupper()
PHP string functions -