PDA

View Full Version : PHP Warning: Cannot use a scalar value as an array



BenBart
July 13th, 2008, 11:08 PM
I have code that is supposed to do something like this:

myArray[0] = "0x123456, 123,121,123,455";
myArray[1] = "0x222222,344,566,343,543";

exc...

How could I get it to work?

What I am trying to do is store a bunch of strings, then play them all back later.

matthewjumps
July 14th, 2008, 04:16 AM
$myArray = array();
$myArray[] = "0x123456, 123,121,123,455";
$myArray[] = "0x222222,344,566,343,543";

tried that?

BenBart
July 14th, 2008, 01:14 PM
$myArray = array();
$myArray[] = "0x123456, 123,121,123,455";
$myArray[] = "0x222222,344,566,343,543";

tried that?

Thank you very much! That fixed it.