0% found this document useful (0 votes)
33 views

Séances String: de L'esprit À La Machine L'approche Professo-Académique

The document discusses string manipulation functions in PHP including searching for text within strings, replacing text within strings, counting characters and words in strings, finding the position of text within strings, and formatting strings. Some key functions mentioned are strlen(), str_word_count(), strstr(), strpos(), substr_count(), strpbrk(), and wordwrap().

Uploaded by

Abdelahad Satour
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Séances String: de L'esprit À La Machine L'approche Professo-Académique

The document discusses string manipulation functions in PHP including searching for text within strings, replacing text within strings, counting characters and words in strings, finding the position of text within strings, and formatting strings. Some key functions mentioned are strlen(), str_word_count(), strstr(), strpos(), substr_count(), strpbrk(), and wordwrap().

Uploaded by

Abdelahad Satour
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

ZCE

De l'esprit à la machine
L'approche Professo-Académique

Séances
String

www.maroclance.com
www.MarocLance.com
 Search for text within a string
 Replace some text within a string with
www.MarocLance.com

another string of text


 Format strings so that they're easier to read
or work with
 Encode and decode strings using various
popular encoding formats
 http://www.php.net/manual/en/ref.strings.
php
www.MarocLance.com
 $myString = 'hello';
 $myString = "hello";
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
strlen

www.MarocLance.com
str_word_count

www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
 strstr() tells you whether the search text is
within the string
www.MarocLance.com

 strpos() and strrpos() return the index


position of the first and last occurrence of
the search text, respectively
 substr_count() tells you how many times the
search text occurs within the string
 strpbrk() searches a string for any of a list
of characters
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
www.MarocLance.com
 By default, wordwrap() makes sure each line is no longer than 75
characters, but you can change this by passing an optional
www.MarocLance.com

second argument:

www.MarocLance.com

www.MarocLance.com

www.MarocLance.com

www.MarocLance.com

www.MarocLance.com

www.MarocLance.com

You might also like