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! 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); 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
Archived
This topic is now archived and is closed to further replies.