Skip to content
Advertisement

Notice: Array to string conversion in

I’m trying to select a value from a database and display it to the user using SELECT. However I keep getting this error:

JavaScript

I thought that the @mysql_fetch_assoc(); would fix this but I still get the notice. This is the part of the code where I’m getting the error:

JavaScript

What am I doing wrong? I’m pretty new to PHP.

Advertisement

Answer

The problem is that $money is an array and you are treating it like a string or a variable which can be easily converted to string. You should say something like:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement