Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technosmarter/6f6b8d39aae7922e83458d8d8cc91d93 to your computer and use it in GitHub Desktop.
Save technosmarter/6f6b8d39aae7922e83458d8d8cc91d93 to your computer and use it in GitHub Desktop.
PHP String Function examples
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 .
@technosmarter
Copy link
Author

technosmarter commented Mar 15, 2019

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 -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment