QAds
12 Ay Taksit
Coby MP305-2G MP3 Player
$8.95
Canon Digital Rebel XSi 12.2 MP Digital SLR Camera with EF-S 18-55mm f/3.5-5.6 IS Lens (Black)
$250.34
Motorola RIZR Z8 Ferrari Quad-Band, 2 MP Camera, MP3 Player and MicroSD Slot
$103.42
Motorola RIZR Z8 Ferrari Quad-Band, 2 MP Camera, MP3 Player and MicroSD Slot
$103.42
:: 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);
 
 
NEW ANSWER
 
Your E-Mail Address
»
Your e-mail will never be shown!  
   
 
Answer
»
Please type your ANSWER and please use [CODE] tag for your codes!  
  Add CODE Quote BOLD ITALIC Underline Align Left Align Center Align Right Add Line  
   
 
Human Check
»
Enter human check code below!  
   
 
       
 
 
Website Designer, Search Engine Optimization Expert, Ajax Developer,Developed And Designed By Mumin Celik With Using PHP, MySQL, CSS, JavaScript, Ajax And Search Engine Optimizer Sinema ve Film Rehberi Sudoku Oyunu