PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

StripNewLines

This filter modifies a given string and removes all new line characters within that string.

Supported options for Zend_Filter_StripNewLines

There are no additional options for Zend_Filter_StripNewLines.

Basic usage

A basic example of usage is below:

<?php
$filter 
= new Zend_Filter_StripNewLines();

print 
$filter->filter("This is (my)\n\rcontent: ');

The above example returns 'This is (my) content:'. Notice that all newline characters have been removed.

Zend Framework