PHP - English

PHP String functions

 

Instead of detailing all the possible string functions you can use, we’ll just
give you a brief list. (There’s loads of them!) There’s an example of how to
use each string function, if you click on the links below. Just dip in to them
as and when needed.

chr( ) Convert an ASCII
value to a its equivalent character

ord( ) Find out what
the ASCII value of a character is

echo( ) An alternative
to the print statement

similar_text( ) Tells
you how similar two strings of text are

str_repeat( ) Repeat
a character a specified number of times

str_replace( ) Replace
one string with another

str_word_count( ) Tells
you how many words a string has

strlen( ) Gets the length
of a string

substr( ) Grab a number
of character from a string

 

Some more examples of string functions can be found on these external
sites:

In the next section, we’ll take a look at PHP Functions: what they are, and
how to create your own.

.medrectangle-1-multi-102{border:none!important;display:block!important;float:none!important;line-height:0;margin-bottom:2px!important;margin-left:0!important;margin-right:0!important;margin-top:2px!important;max-width:100%!important;min-height:250px;min-width:300px;padding:0;text-align:center!important}

|

Kaynak : https://www.homeandlearn.co.uk/php/php7p8.html ‘sitesinden alıntı

Yorum Yap