1. there is a variable which may or may not have a url link in between text, if there is a url it has to be stored in a variable $url. text before link shall be stored in before and after text in $after.
Code: Select all
$var=$_POST['text'];Code: Select all
$var="hi, http://google.com is a good site ";2. how can i replace html markups (symbols] by suitable code in same variable? ex. > should be replaced by & g t;
3. how can I search for the existence of a word in above variable?. for ex. if $tobesearched="good" in above $var
4. on run time how to add a word before/after a particular word in above variable $var. for ex. after adding < b > before 'good', $var should become $var="hi, http://google.com is a < b >good site ";
5. on run time how to remove a particular word ?
IF YOU HAVE A WORKING SOLUTION PLEASE POST