English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Character String Functions Manual
The chop() function is an alias of the rtrim() function
chop(string,charlist)
It is used to remove spaces
It returns the modified string
Serial Number | Parameters and Description |
---|---|
1 | str This string needs to be escaped |
2 | charlist Used to specify the characters to be deleted |
Try the following example
<?php $str = "oldtoolbag.com!"; echo $str . "\n"; echo chop($str,"com!"); ?>Test and see‹/›
Output Result
oldtoolbag.com! w3codebox