fusionxn1 Posted December 17, 2006 Share Posted December 17, 2006 Is it possible to replace everything in a string except for a specified area? for example:<a href="ADDRESS"><img src="IMGADDRESS"></a> -- Remove everything from the string except the Image Address itself.Thanks. Link to comment https://forums.phpfreaks.com/topic/30970-str_replace-question/ Share on other sites More sharing options...
NovaHaCker Posted December 17, 2006 Share Posted December 17, 2006 It is possible,You will need to get involved with regular expressions to accomplish this.A simple google search will yield lots of results.Hope this helps. Link to comment https://forums.phpfreaks.com/topic/30970-str_replace-question/#findComment-142924 Share on other sites More sharing options...
NovaHaCker Posted December 17, 2006 Share Posted December 17, 2006 also i might add that str_replace is not the function that you will be using for something like this, more like preg_match from memory.Sorry I don't do a terrible amount of work in this area to be of more use. Link to comment https://forums.phpfreaks.com/topic/30970-str_replace-question/#findComment-142925 Share on other sites More sharing options...
fusionxn1 Posted December 17, 2006 Author Share Posted December 17, 2006 Basicaly what I have is some HTML code returned to me.5 Images linked etc. I want to be able to remove all the code and leave the 5 image address and assign a verible to each one.Anyone know how ot do this? Link to comment https://forums.phpfreaks.com/topic/30970-str_replace-question/#findComment-142936 Share on other sites More sharing options...
fusionxn1 Posted December 17, 2006 Author Share Posted December 17, 2006 I have got rid of all the junk now and i have 5 urls in a row. Now how would i make each one have its own varible? Link to comment https://forums.phpfreaks.com/topic/30970-str_replace-question/#findComment-142947 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.