xenoalien Posted March 29, 2009 Share Posted March 29, 2009 Okay, here is part of my code. It displays right in Google Chrome but no Firefox or IE. if($row['filetype']=='mp3') {$fileiconpath = $websitelink.'images/icons/music.png';} else {$fileiconpath = 'images/icons/page.png';} //================================================== echo "</td><td>"; echo "<center><img src="".$fileiconpath.""></center>"; echo "</td></tr>"; Link to comment https://forums.phpfreaks.com/topic/151666-links-to-images-do-not-display-from-a-php-variable-correctly/ Share on other sites More sharing options...
taquitosensei Posted March 29, 2009 Share Posted March 29, 2009 Here's how I'd do this echo $websitelink; // to make sure it's right see if it has the trailing / or not if($row['filetype']=='mp3') {$fileiconpath = $websitelink.'images/icons/music.png';} else {$fileiconpath = 'images/icons/page.png';} //================================================== echo $fileiconpath; // just to make sure it looks right echo "</td><td>"; echo "<center><img src='".$fileiconpath."'></center>"; echo "</td></tr>"; Link to comment https://forums.phpfreaks.com/topic/151666-links-to-images-do-not-display-from-a-php-variable-correctly/#findComment-796461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.