chop

Syntax: chop() — Alias of rtrim() Description: This function is an alias of: rtrim().

Example 1

<?php
$str1="hai ";
$str2="good ";
$str3="morning ";
echo $str1.$str2.$str3;
echo '<br/>';
echo chop($str1).chop($str2).chop($str3);
?>

OUTPUT

hai good morning 
haigoodmorning 

Example 2

<?php
$str1="hai are YOU";
echo chop($str1,'A..Z');
?>

OUTPUT

hai are

 

Leave a Reply

Your email address will not be published. Required fields are marked *