Welcome Guest, Not a member yet? Register   Sign In
php preg_replace function
#14

[eluser]basty_dread[/eluser]
Code:
$string = "the quick brown brown fox jumps over the lazy dog, Brown Fox. <h2>The Brown Fox</h2>";
$save = preg_replace('/(<h.*>(.*)<\/h.*>)/ie',"str_replace(' ','-','$1')" , $string);
print_r($save);

echo "<br>";
echo preg_replace('/(<h.*>(.*)<\/h.*>)/ie',"str_replace('-',' ','$1')",$save);

i just put this to turn it back to its original. works great.. thank you..
i will experiment more on this..


Messages In This Thread
php preg_replace function - by El Forum - 03-03-2010, 02:55 AM
php preg_replace function - by El Forum - 03-03-2010, 09:27 AM
php preg_replace function - by El Forum - 03-03-2010, 06:50 PM
php preg_replace function - by El Forum - 03-04-2010, 09:20 AM
php preg_replace function - by El Forum - 03-07-2010, 06:31 PM
php preg_replace function - by El Forum - 03-07-2010, 09:39 PM
php preg_replace function - by El Forum - 03-07-2010, 11:14 PM
php preg_replace function - by El Forum - 03-07-2010, 11:16 PM
php preg_replace function - by El Forum - 03-07-2010, 11:21 PM
php preg_replace function - by El Forum - 03-07-2010, 11:24 PM
php preg_replace function - by El Forum - 03-07-2010, 11:40 PM
php preg_replace function - by El Forum - 03-07-2010, 11:49 PM
php preg_replace function - by El Forum - 03-07-2010, 11:58 PM
php preg_replace function - by El Forum - 03-08-2010, 12:06 AM
php preg_replace function - by El Forum - 03-08-2010, 01:05 AM
php preg_replace function - by El Forum - 03-08-2010, 07:34 AM
php preg_replace function - by El Forum - 03-08-2010, 06:16 PM
php preg_replace function - by El Forum - 03-08-2010, 09:55 PM
php preg_replace function - by El Forum - 03-09-2010, 03:16 AM
php preg_replace function - by El Forum - 03-09-2010, 06:43 AM
php preg_replace function - by El Forum - 03-09-2010, 07:36 PM
php preg_replace function - by El Forum - 03-09-2010, 07:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB