PHP function: strip_whitespace

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 4, 2020   (RSS)

By kovali - May 4, 2020

Hi,

I want to strip the whitespace inbetween 2 words.

With PHP function: strip_whitespace

But this is not working the way I expect: <?php echo strip_whitespace($record['title']) ?>

Is this function not working in CMSB ?

Thx,

Koen

By gkornbluth - May 4, 2020

Hi Koen,

Try something like this...

<?php $stripped = $record['title'] ?>
<?php $stripped = str_replace(' ', '', $stripped); ?>
<?php echo $stripped ?>

Hope that helps,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php