|
|
PHP chop() function - PHP
|
Views : 584
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
The chop() function will remove a white space or other predefined character from the right end of a string.
This function is an alias of the rtrim() function.
syntax:
chop(string,charlist)
Example:
<?php
$str = "Hello World!\n\n";
echo $str;
echo chop($str);
?>
In this example we will use the chop() function to remove characters from the right end of a string:
Output:
Hello World! Hello World! |
|
By Rekha, On - 2010-01-28 |
|
|
|