Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by breeze351
at 2024-07-20 12:33:52
Point:500 Replies:4 POST_ID:829038USER_ID:11780
Topic:
PHP Scripting Language;;
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/Survey_Display.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/chris/Survey_Display.php on line 411
The code in the php is:
411: $work = number_format("$ROW[STORE]");
412: echo $work;
413: echo "<br>";
WTF?
Accepted Solution
Expert: Ray Paseur replied at 2024-07-20 13:28:43
500 points EXCELLENT
How to use quotes in PHP?
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_12241-Quotation-Marks-in-PHP.html
Try it like this:
$work = number_format($ROW['STORE']);
Add error_reporting(E_ALL) to the top of all of your PHP scripts so PHP will tell you about these errors instead of silently disguising them!
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_12241-Quotation-Marks-in-PHP.html
Try it like this:
$work = number_format($ROW['STORE']);
Add error_reporting(E_ALL) to the top of all of your PHP scripts so PHP will tell you about these errors instead of silently disguising them!
Expert: duncanb7 replied at 2024-07-20 12:58:25
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
Expert: duncanb7 replied at 2024-07-20 12:55:32
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
Expert: Gary replied at 2024-07-20 12:38:06
What is the value of $ROW[STORE]
Is STORE a variable? If not it should be like
$ROW['STORE']
Is STORE a variable? If not it should be like
$ROW['STORE']