folgendes Problem:
ich lese aus der DB Bilder ein und gebe die mit hilfe von echo aus (als array) nun die haben aber keine Anführungszeichen und html brouser verstehts nicht ohne(habe z.B bils[1]=1.jpg brauch aber "1.jpg"). Vielen dank im vorraus
while ($item = mysql_fetch_array($result))
{
$items[] = $item["artname"];
$bild[] = $item["bild"];
}
$prices = array( 24.95, 1000, 19.99, 34.95 );
?>
<table border="1">
<tr>
<th>Artikelbeschreibung</th>
<th>Preis</th>
</tr>
<?php
for($i = 0; $i < count($items); $i++) {
echo("<tr>");
echo("<td>".$items[$i]."</td>");
echo("<td>$".number_format($prices [$i],2)."</td>");
echo("<td><img src=$bild[$i]</td>");
echo("</tr>");
}
ich lese aus der DB Bilder ein und gebe die mit hilfe von echo aus (als array) nun die haben aber keine Anführungszeichen und html brouser verstehts nicht ohne(habe z.B bils[1]=1.jpg brauch aber "1.jpg"). Vielen dank im vorraus

while ($item = mysql_fetch_array($result))
{
$items[] = $item["artname"];
$bild[] = $item["bild"];
}
$prices = array( 24.95, 1000, 19.99, 34.95 );
?>
<table border="1">
<tr>
<th>Artikelbeschreibung</th>
<th>Preis</th>
</tr>
<?php
for($i = 0; $i < count($items); $i++) {
echo("<tr>");
echo("<td>".$items[$i]."</td>");
echo("<td>$".number_format($prices [$i],2)."</td>");
echo("<td><img src=$bild[$i]</td>");
echo("</tr>");
}
Kommentar