Propellerads

الاثنين، 23 يناير 2017

PHP String Functions

PHP String Functions



In this chapter we will look at some commonly used functions to manipulate strings.

Get The Length of a String

The PHP strlen() function returns the length of a string.
The example below returns the length of the string "Hello world!":


Example



<!DOCTYPE html>
<html>
<body>

<?php
echo strlen("Hello world!");
?>
 

</body>
</html>

Easy Learning with "Show PHP"

Easy Learning with "Show PHP"

Our "Show PHP" tool makes it easy to learn PHP, it shows both the PHP source code and the HTML output of the code.



Example

<!DOCTYPE html>
<html>
<body>

<?php
echo "My first PHP script!";
?>


</body>
</html>