This function returns a string with w3coded php whitespace whitespace stripped from the beginning and w3coded php whitespace end of string. Without the second parameter, w3coded php whitespace trim() will strip these characters: w3coded php whitespace ,trim — Strip whitespace (or other characters) w3coded php whitespace from the beginning and end of a string,ltrim() - w3coded php whitespace Strip whitespace (or other characters) from the w3coded php whitespace beginning of a string,rtrim() - Strip whitespace w3coded php whitespace (or other characters) from the end of a w3coded php whitespace string
string(32) " These are a few words :) ... "
string(16) " Example string
"
string(11) "Hello World"
string(28) "These are a few words :) ..."
string(24) "These are a few words :)"
string(5) "o Wor"
string(9) "ello Worl"
string(14) "Example string"
array(3) {
[0]=>
string(5) "apple"
[1]=>
string(7) "banana "
[2]=>
string(11) " cranberry "
}
array(3) {
[0]=>
string(5) "apple"
[1]=>
string(6) "banana"
[2]=>
string(9) "cranberry"
}
Last Update : 2023-09-22 UTC 12:12:50 PM
Last Update : 2023-09-22 UTC 12:12:40 PM
Last Update : 2023-09-22 UTC 12:12:23 PM
Last Update : 2023-09-22 UTC 12:12:08 PM
Last Update : 2023-09-22 UTC 12:11:49 PM
Last Update : 2023-09-22 UTC 12:11:29 PM
Last Update : 2023-09-22 UTC 12:11:14 PM