PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi
I place a piece of code and its result. I don't know why array value is not shown.
Even when I use array_key_exists(), it returns false
this is the code:
$sql = mysql_query("SELECT * FROM brokerprices");
while (list($name,$value) = mysql_fetch_row($sql)) {
$result[$name]=$value;
}
print_r($result);
echo "<br><br>But there should be '0.79' that is not:".$result[ASAS];
Slight syntax warning - if you turn on error reporting (which is useful anyway during dev) you will probably find it complains about an undefined constant (ASTC) because it's looking for a constant called ASTC rather than a string. Surround it in quotes to fix this: