FFFF Posted November 17, 2006 Share Posted November 17, 2006 Heey ! I have one question let's say I have a string called description :<img class="okvir" src="http://thinkature.com/images/postits.jpg" align="left" border="0" hspace="4" vspace="3" /><a href="http://thinkature.com" class="ng_url">Thinkature </a>je novi Web servis koji omoguæava <strong>kolaboraciju u realnom vremenu</strong> u formi <strong><em>online </em>panela</strong>. <br /><br />... and I want to echo it but without the picture! How can I get rid of the picture <img class="okvir" src="http://thinkature.com/images/postits.jpg" align="left" border="0" hspace="4" vspace="3" /> ? is there any function to replace the <img.. /> with "" or is there an easier way ? I tried with preg but I don't know how to use it in my problem ... :( help ??? ??? ??? Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted November 17, 2006 Share Posted November 17, 2006 if you just want to kill the beginning and end, you could use substr($string,4,-2); Quote Link to comment Share on other sites More sharing options...
FFFF Posted November 17, 2006 Author Share Posted November 17, 2006 .. I get it. But the problem is that I have to remove all the "<img ............. />" part, and that part is not always necessary at the begining of my string ... help ??? Quote Link to comment Share on other sites More sharing options...
taith Posted November 17, 2006 Share Posted November 17, 2006 hey, only thing i could think of would be the strip_tags($text); function. that would remove any html code from your string... Quote Link to comment 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.