Checking if a string contains a substring is very frequently occuring use case in PHP code. PHP functions strpos or stripos (case insensitive version) can read more
Splitting a string/text at a delimiter is very common use case in php. One can either use php explode (split on a fixed delimiter) or read more
Take last 3 characters when string is big enough Take last 3 characters when string is smaller than 3 chars
Files or strings in DOS format may have \r (carriage return) along with \n (newline). This may appear as ^M in some editors. Here is read more
Copyright © 2019 InfoHeap.
Powered by WordPress