php help! - if url contains something echo something else

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fruit-toast
Forum Newbie
Posts: 1
Joined: Thu Apr 22, 2010 12:51 am

php help! - if url contains something echo something else

Post by fruit-toast »

hi,

new to php blah blah… help

i have a jQuery gallery when an image is being viewed i need to have a link appear. im also not too familiar with jQuery…

what php code would i use to read the below url, and depending on which jpg is in it and echo a link on the page?

http://url/web-test.php#/images/folio/web-1a.jpg

if someone could help out i will type out a very sincere thank you.
dejvos
Forum Contributor
Posts: 122
Joined: Tue Mar 10, 2009 8:40 am

Re: php help! - if url contains something echo something els

Post by dejvos »

Hi,

I think, you need to get an URL of an image by JS ... check object Image

It could be smth like this:

Code: Select all

document.write(objectImage.src);
Post Reply