breeze351
asked on
Problems with a new error with number_format
I have code that did work. Now I'm getting this error from the page:
Warning: number_format() expects parameter 1 to be double, string given in /home/mrbreeze/public_html /chris/Sur vey_Displa y.php on line 411
The code in the php is:
411: $work = number_format("$ROW[STORE] ");
412: echo $work;
413: echo "<br>";
WTF?
Warning: number_format() expects parameter 1 to be double, string given in /home/mrbreeze/public_html
The code in the php is:
411: $work = number_format("$ROW[STORE]
412: echo $work;
413: echo "<br>";
WTF?
First try $work = number_format("$ROW[STORE] ")
to be $work = number_format($ROW[STORE]) ;
If still not, probably, $ROW[STORE] array is NOT matched to number of store, STORE constant, so you need to check the method how you save any data in $ROW[STORE]
If okay, please provide more code around data operation for $ROW[STORE]
Duncan
to be $work = number_format($ROW[STORE])
If still not, probably, $ROW[STORE] array is NOT matched to number of store, STORE constant, so you need to check the method how you save any data in $ROW[STORE]
If okay, please provide more code around data operation for $ROW[STORE]
Duncan
Could you print out $ROW[STORE] by print_r($ROW) and echo count($ROW) in php
to see whether it is matched to STORE or not ?
Duncan
to see whether it is matched to STORE or not ?
Duncan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is STORE a variable? If not it should be like
$ROW['STORE']