[ create a new paste ] login | about

Link: http://codepad.org/BHnIMXJa    [ raw code | output | fork ]

PHP, pasted on Jul 20:
1
2
3
4
5
6
7
8
9
<?php
$str = '<p class="code">some string here</p>';

$pattern = array();
$pattern[0] = '!<p class="code">!';
$pattern[1] = '!</p>!';
$str = preg_replace($pattern,"", $str);

var_dump($str);


Output:
1
string(16) "some string here"


Create a new paste based on this one


Comments: