pixeltrace Posted April 25, 2008 Share Posted April 25, 2008 Hi, i need help and i need to know how am i going to strip of some characters into my database item example my Channel Description here<br /><ul><li>Channel Type: Philippine Channel</li><li>Schedules: <a href="images/schedules/abc.pdf" target="_blank">Latest Schedule</a></li><li>Website: <a href="http://www.abc.com.ph" target="_blank">www.abc.com.ph</a></li></ul> i only want to echo "images/schedules/abc.pdf" how can i strip off the other content? hope you could help me with this. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/102842-how-to-strip-off-characters/ Share on other sites More sharing options...
Barand Posted April 25, 2008 Share Posted April 25, 2008 <?php $p1 = strpos($str,'href="') + 6; $p2 = strpos($str,'target="_blank"') - 2; echo substr($str, $p1, $p2 - $p1); Quote Link to comment https://forums.phpfreaks.com/topic/102842-how-to-strip-off-characters/#findComment-526859 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.