Jump to content

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.

Edited by jazzman1

@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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.