Check the following string manipulation related functions in PHP. String manipulation is pretty common in Software Development (esp. in high level, even in low level applications say you are working with network protocols – you need to interpret/parse the protocol language). Memorizing library functions is always a good thing – it’s a matter of productivity. However, knowing more functions does not guarantee that you will be able to solve a programming problem. However, if you are good at solving problems in general (in programming in general), knowing functions will improve your productivity (may also help to maintain/improve quality of software indirectly).
You will find many string related functions very useful such as:
- trim, rtrim, ltrip, chop, and similar: You may use these functions on user inputs, on data from databases, on data to insert into databases, while comparing two strings.
- Wordwrap: To wrap words to create consistent user interfaces
- substr_ compare, substr_ count, substr_ replace, substr, strstr, strchr: You will find these functions very usefull. Mostly substring related.
- htmlspecialchars, addslashes, stripslashes, stripcslashes, html_ entity_ decode, htmlentities, htmlspecialchars_ decode,htmlspecialchars: For storing/retrieving HTML data into/from databases.
- echo, print, fprintf, sprintf, vprintf, vfprintf: To output string. Formatted, non-formatted.
- strtok, split, implode, explode, chunk_split : These are for dividing and merging strings.
- money_format, number_format: To output string in money or number format.
- strnatcasecmp, strnatcmp, strncasecmp, strncmp, similar_text : String comparison related functions.
- strtolower, strtoupper, ucfirst, ucwords, lcfirst: the names tell it all. Case conversion related.
- md5_ file, md5, sha1_ file, sha1, crc32, crypt: encryption & related
- sscanf: formatted input
- addcslashes
- addslashes
- bin2hex
- chop
- chr
- chunk_ split
- convert_ cyr_ string
- convert_ uudecode
- convert_ uuencode
- count_ chars
- crc32
- crypt
- echo
- explode
- fprintf
- get_ html_ translation_ table
- hebrev
- hebrevc
- html_ entity_ decode
- htmlentities
- htmlspecialchars_ decode
- htmlspecialchars
- implode
- join
- lcfirst
- levenshtein
- localeconv
- ltrim
- md5_ file
- md5
- metaphone
- money_ format
- nl_ langinfo
- nl2br
- number_ format
- ord
- parse_ str
- printf
- quoted_ printable_ decode
- quoted_ printable_ encode
- quotemeta
- rtrim
- setlocale
- sha1_ file
- sha1
- similar_ text
- soundex
- sprintf
- sscanf
- str_ getcsv
- str_ ireplace
- str_ pad
- str_ repeat
- str_ replace
- str_ rot13
- str_ shuffle
- str_ split
- str_ word_ count
- strcasecmp
- strchr
- strcmp
- strcoll
- strcspn
- strip_ tags
- stripcslashes
- stripos
- stripslashes
- stristr
- strlen
- strnatcasecmp
- strnatcmp
- strncasecmp
- strncmp
- strpbrk
- strpos
- strrchr
- strrev
- strripos
- strrpos
- strspn
- strstr
- strtok
- strtolower
- strtoupper
- strtr
- substr_ compare
- substr_ count
- substr_ replace
- substr
- trim
- ucfirst
- ucwords
- vfprintf
- vprintf
- vsprintf
- wordwrap
From: http://sitestree.com/?p=5261
Categories:16
Tags:
Post Data:2006-08-01 21:49:26
Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a>
In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
<a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>