Ver Mensaje Individual
  #7 (permalink)  
Antiguo 12/02/2007, 16:37
El Patrón.
 
Fecha de Ingreso: abril-2006
Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años
Puntos: 3
Re: str_replace ???

Hola

Bueno, no entiendo algunas funciones de tu codigo, pero yo lo haria asi

<?
$link = mysql_connect("localhost","root","");
mysql_select_db("FabianChacon-Centrodebelleza");

$query= "SELECT DISTINCT(Bildart) FROM BilderExtraInfos WHERE Bildart <> '' ORDER BY Bildart ASC";

if ($debug) {
echo $query."<br><br><br>";
}

if (($erg = mysql_query ($query)) == FALSE)
{
echo "Fehler bei der SQL-Abfrage: Fehlercode " . mysql_errno () . " - " . mysql_error ();
}
else {
?>
<select name='Bildart' id='Bildart' size='5' multiple>
<option value=''>- No Preferences -</option>
<?
while ($arr = mysql_fetch_array($erg))
{
$arr[0] = str_replace("farbe", "colour",$arr[0]);
$arr[0] = str_replace("grau", "black/white",$arr[0]);
?>

<option value="<?=$arr[0]?>"><?=$arr[0]?></option>";
<?
}
?>
</select>
<?
}
?>

Suerte