thank you so much for your post.
<?php
$string = "Hello And welcome To ^#phpfreaks# the best php forum and the ^#yahoo# is the best email and my ^#facebook# is the best site";
if(preg_match_all('/\^#(.+?)#/',$string,$matches)){
foreach($matches[1] as $match)
print $match;
}
?>
this code posted before by effigy and it give me a lot of errors when i tried to change the symbols
so i used this code
<?php
$string = "Hello And welcome To ^#phpfreaks# the best php forum";
$s = strpos($string,'#');
print substr($string,$s+1,strpos($string,'#',$s+1) - $s - 1);
?>
and its working just like dream.
the problem when i need use more than one time
is there anyway to use the same code for than one time in the same variable?