help!!! replace 0 with word "unavailable"
| From: | Bartosz Aninowski | Date: | Wed, 17 May 2000 03:20:58 +0000 |
| Subject: | help!!! replace 0 with word "unavailable" | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-124@lists.php.net to get a copy of this message | ||
I have got something like this
<?
include "inc/config.inc";
include "$INCLUDE_PATH/lib.inc";
include "$INCLUDE_PATH/cennik.inc";
?>
<?
$result=mysql_db_query($SQLDB,"SELECT price_list FROM price_lists");
for ($i=0; $i<count(mysql_num_rows($result)); $i++){
{
if ($arr[$i] == 0) $arr[$i] = "brak";
}
}
while($row=mysql_fetch_array($result)){
echo "</tr><tr bgcolor=$bgcolor><td
bgcolor=\"#5B539D\"> </td><td td
class=\"tabela\"
align=center>".$arr[$row[price_list]]."</td></tr>\n";
}
?>
and I want to change all records with value "0" into word "unavailable"
and it works but doesn't show rest of records with diffrent value (only
unavailable)
Bart