Home php PHP Warning: Cannot Use A SCALAR VALUE AS AN ARRAY

PHP Warning: Cannot Use A SCALAR VALUE AS AN ARRAY

Author

Date

Category

There is such a PHP code:

$ totaldead_allldef [1] = $ Dead ['1'] + $ Dead ['2'] + $ Dead ['3'] + $ Dead ['4'] + $ Dead ['5'] + $ Dead ['6'] + $ Dead ['7'] + $ Dead ['8'] + $ Dead [' 9 '] + $ Dead ['10'];

it causes such warning:

Warning: Cannot Use a Scalar Value As An Array in /vaR/www/GameEngine/automation.php on line 1551

What does this warning mean? Why it happens? How to get rid of it?


Answer 1, Authority 100%

You or $ TotalDead_Aldef or $ Dead or both variables are not announced as Array ()

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions