explode url

I have a php search that has the following code:
<img src= “http://www.mysite.com/’.$row[‘thumbName’].’” width=“90” height=“65”

One of my thumbName urls is /outputs/ComicBooks/thumbs/book_879511_1.jpg|outputs/ComicBooks/thumbs/book_879511_2.jpg|

How do I explode the url to end at the first | to get the correct url for the thumbnail? I’ve tried but failed!

Thanks

You need to use explode and then foreach to loop through the results. Google is your friend.

I didnt read the whole code, but it looks like this should get you going

http://www.theukwebdesigncompany.com/articles/article.php?article=165

Sponsor our Newsletter | Privacy Policy | Terms of Service