QAds
Apple iPod nano 8 GB Gumus
$91.00
Motorola RIZR Z8 Ferrari Quad-Band, 2 MP Camera, MP3 Player and MicroSD Slot
$194.99
Samsung S5233 with 3 MP Camera, MP3 player
$136.29
Samsung I7500 Android 5 MP Camera, Wi-Fi, and 8 GB Memory
$599.99
:: HOME PHP How can I remove links from content?
 
How can I remove links from content?
How can I remove links from content? I read some WEBsite content and it has so many links inside and I want to remove all links from it. how can I do that?
at first you need to take string between <a></a> tags and then you need to replace it. you can use below code to do that.

 
 
Code
$text = '.. content here ...';
$p1 = strpos($text, '<a href=');
$p2 = (strpos($text, '</a>') 4) - $p1;
$rep = substr($text, $p1, $p2);
echo str_replace($rep, '',$text);