-1

I have next html source:

<a id="smallphot1" style="cursor:pointer;" title="Mobile phone / smartphone Samsung Galaxy S Duos S7562 - gallery" onclick="loadPhoneSmallImg('phot1', 'http://localhost/02_samsung_galaxy_s_duos_s7562.jpg', 'http://localhost/', '_samsung_galaxy_s_duos_s7562.jpg' , '250px', '450px','4')"><img src="http://localhost/02_samsung_galaxy_s_duos_s7562.jpg" alt="Photo Samsung Galaxy S Duos S7562" border="0"></a>

and all I want is to get http://localhost/02_samsung_galaxy_s_duos_s7562.jpg

Is there possible to do this via PHP?

Domuta Marcel
  • 509
  • 5
  • 16

2 Answers2

1

If you want to fetch the URL, you can do that using this code:

$parts = explode("', '", $your_html);

// http://localhost/02_samsung_galaxy_s_duos_s7562.jpg
echo $parts[1];
0

In javascript you can hide a DIV tag:

<a href="#" onclick="document.getElementById('test').style.visibility = 'visible'">test</a>

<div id="test" style="visibility: hidden">
 <img src="image.jpeg" />
</div>