Jump to content

echo php image with url


stegers72

Recommended Posts

Hello ;

 

I am trying to echo an image with url, but I keep getting an error, I think my parameter .$modelurl.$item['performerid'].$modelpageext is not correct. Anyone that can help me out a bit ?

        echo '<img src="'.$file.'" width=\"160\" height=\"120\" border=\"0\" alt=\"\">';
        <a href=\".$modelurl.$item['performerid'].$modelpageext\">";

Many thanks in advance ;

Pascal

Link to comment
https://forums.phpfreaks.com/topic/282256-echo-php-image-with-url/
Share on other sites

Need more info.  What do those vars contain and what should the href look like?  And are you trying to make a clickable image?

 

Thanks for your reply, yes I am trying to make a clickable image

 

$ext = '.jpg';

$modelurl = 'http://www.test-url/';

$modelpageext = '.php';

 

$ext = '.jpg';

$modelurl = 'http://www.test-url/';

$modelpageext = '.php';

@stegers72, using a "http://" prefix inside a "href" attribute tells the browser, that this searchable file/directory is outside of this server. It's not good for performance, but there is no problem if you want to use it, of course.

 

@cataiin, Abra is correct by saying to use meaningful variable names.

@stegers72, using a "http://" prefix inside a "href" attribute tells the browser, that this searchable file/directory is outside of this server. It's not good for performance, but there is no problem if you want to use it, of course.

 

@cataiin, Abra is correct by saying to use meaningful variable names.

 

Thanks for the help. I appreciate it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.