PHP chop() function - PHP Views : 584
Tagged in : PHP
0 0
Send mail
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



    Login to add Comments .