Jump to content


Photo

How to Use "strip_tags" string function?

Magento Ecommerce php

  • Please log in to reply
1 reply to this topic

#1 Magentoecommerce

Magentoecommerce

    Newbie

  • Members
  • Pip
  • 7 posts
  • LocationLilburn

Posted 29 May 2012 - 12:56 AM

How to Use "strip_tags" string function?

#2 Andy Johnson

Andy Johnson

    Advanced Member

  • Administrators
  • 339 posts
  • LocationLondon, UK

Posted 29 May 2012 - 03:03 AM

Hi there,

The PHP strip_tags function allows you to strip HTML and PHP tags from a string. For example...

<?php
$input_string = '<b>w3resource.com</b>';
echo 'Before strip : '.$input_string.'<br>';
echo 'After strip : '.strip_tags('<b>w3resource.com</b>');
?>

Will output...

Before strip : w3resource.com
After strip : w3resource.com
-----

Andy Johnson
Eleven2 Creative Director.

http://twitter.com/andy92





Also tagged with one or more of these keywords: Magento, Ecommerce, php

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users