<?php
Please find below string functions in daily use
//trim()
trim() : It removes all the whitespaces from both sides of a string,
ltrim() and rtrim() for removing them from only one side of the string (left or right).
//explode
It convert string to array based on comma, space etc…
Ex: echo explode(” “,$arr); // Array
//implode
It convert array to string
Ex: echo implode(” “,$arr); // String
//str_replace
It’s used for replace word
Ex: echo str_replace(“world”,”Peter”,”Hello world!”);
//world replaced with peter
//preg_replace
Perform a regular expression search and replace
Ex: $str = preg_replace(‘/\s+/’, ”, $str);
// But if it could be due to space, tab…you can use
//md5
It encode’s the string
//str_split
Splits a string into an array
//strcmp
Compares two strings (case-sensitive) returns ‘0’ when true.
we are having lot of string functions please find below URL….