inte så här iaf :o(
<?php
if(!file_exists($row[id].".jpg"))
echo' <img src="home/'.$row[id].'.jpg" width="80" border="0" alt="" hspace="8" vspace="3"><br>';
?>
2 svar · 150 visningar · startad av Qonos
inte så här iaf :o(
<?php
if(!file_exists($row[id].".jpg"))
echo' <img src="home/'.$row[id].'.jpg" width="80" border="0" alt="" hspace="8" vspace="3"><br>';
?>
Så här kanske ?
<?
$min_bild = $row[id];
if(file_exists($min_bild.jpg")) {
echo " <img src=\"home/$min_ bild.jpg\" width=\"80\" border=\"0\" alt=\"\" hspace=\"8\" vspace=\"3\"><br>";
} else {
echo " <img src=\"home/standard.jpg\" width=\"80\" border=\"0\" alt=\"finns inte\" hspace=\"8\" vspace=\"3\"><br>";
}
?>
------------------
" The code is out there "
<?
$min_bild = 'home/'.$row[id].'.jpg';
if(file_exists($min_bild)) {
echo " <img src=\"$min_bild\" width=\"80\" border=\"0\" alt=\"\" hspace=\"8\" vspace=\"3\"><br>";
} else {
echo " <img src=\"home/standard.jpg\" width=\"80\" border=\"0\" alt=\"finns inte\" hspace=\"8\" vspace=\"3\"><br>";
}
?>
fick fixa lite med det, men nu fungerar det... tackar