hendrikbez Posted August 4, 2022 Share Posted August 4, 2022 I am trying to show a image with a url link, the link is showing when you hover over it but the image is not showing. Getting image from my laptop. What am I doing wrong here? <?php $domains = [ "SHIBA INU" => "BINANCE%3ASHIBBUSD", "BABY DOGE BILLIONAIRE" => "HUOBI%3ABABYDOGEUSDT", "COIN 98" => "FTX%3AC98USD" ]; $chart = strtolower($checkSqlRow["CHART"]); echo "<td><a href='https://www.tradingview.com/chart/P2500000/?symbol={$domains[$checkSqlRow["CHART"]]} 'style='color:lime' target='_blank' ><img src=\assets\img\Table\chart1.png\" />$chart</a></td>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/315134-image-does-not-want-to-show-in-my-table/ Share on other sites More sharing options...
hendrikbez Posted August 4, 2022 Author Share Posted August 4, 2022 I have figure out what the problem was 1 / at the beginning was the problem Quote Link to comment https://forums.phpfreaks.com/topic/315134-image-does-not-want-to-show-in-my-table/#findComment-1598937 Share on other sites More sharing options...
ginerjm Posted August 4, 2022 Share Posted August 4, 2022 I think you are missing a single quote in your img tag as well. See below. echo "<td> <a href='https://www.tradingview.com/chart/P2500000/?symbol={$domains[$checkSqlRow["CHART"]]}' style='color:lime;' target='_blank'> <img src='\assets\img\Table\chart1.png\'/> $chart </a> </td>"; And perhaps that trailing backslash on the png filename is not necessary. Quote Link to comment https://forums.phpfreaks.com/topic/315134-image-does-not-want-to-show-in-my-table/#findComment-1598943 Share on other sites More sharing options...
requinix Posted August 4, 2022 Share Posted August 4, 2022 Might I suggest not using backslashes at all? Quote Link to comment https://forums.phpfreaks.com/topic/315134-image-does-not-want-to-show-in-my-table/#findComment-1598958 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.