arrays - How to correct my php number_format error? -
I get the error below my array code How can I fix this error to display results?
Error: My code: You must use $ to use the variable ... Otherwise, you are checking for constants that do not exist. Warning: the value of the number-format () is 1 parameter double, string is
$ account ['test'] = 775.57; $ Account ['savings'] = 2275.31; $ Account ['moneyMarket'] = 4554.43; Print ("& lt; Table & gt;"); Print ("& lt; tr & gt; & lt; td & gt; Checking Balance: & lt; / td> & lt; td & gt; $" Number-Detection (Check, 2). "& Lt ; / Td> & lt; / tr & gt; "); Print ("& lt; tr & gt; & lt; td & gt; Savings Balance: & lt; / td & gt; & lt; td & gt; $" No.-Format (saving, 2). "& Lt ; / Td> & lt; / tr & gt; "); Print ("& lt; tr & gt; & lt; td & gt; Money MkT Balance: & lt; / td & gt; & lt; td & gt; $" No.-Format (Money Market, 2). " & Lt; / td> & lt; / tr & gt; "); Print ("& lt; / Table & gt;");
number_format ($ account ['checking'], 2)
Comments
Post a Comment