• PHP Video Tutorials

PHP - Function chop



Syntax

chop(string,charlist)

Definition and Usage

It is used to removes whitespace

Return Values

It returns the modified string

Parameters

Sr.No Parameters & Description
1

str

This string to be escaped

2

charlist

It is used to specifies the characters that should be remove

Example

Try out the following example

<?php
   $str = "Tutotrials Point!";
   
   echo $str . " ";
   echo chop($str,"Point!");
?>

This will produce following result −

Tutotrials Point!
Tutotrials
php_function_reference.htm
Advertisements