"Cannot use a scalar value as an array in" stupid videos RSS PHP error in script somewhere?
I am trying to make a website with funny videos and photos called www.rubberseep.com? i think i might have made a mistake in the PHP because anyone that goes there see the error "Cannot use a scalar value as an array in" written about 250 times at the top of the page AND all my RSS video feeds are no longer working. this was working great for about 1 month, now it just stopped, any ideas what went wrong? thanks!
Public Comments
- This error means that you attempted to use a variable which was defined with a standard value as an array. For instance, lets say you created a variable called $x and you gave it a value of 0. So $x = 0. $x is considered a scalar value, a single valued variable. So if you attempt to use that value as an array (without defining it as an array) you get that error. So the following code would then give you that error.... $x[0] = 2; $x was defined as a single value, not an array, so you can't act like it is an array by adding a subscript to it and attempting to assign a value. You will have to redefine the value as an array then use it. $x = 0; // Reassign the variable to an array $x = array(); // Now you can use it as an array $x[0] = 2; So lookup the line number it tells you to and you will most likely find that it contains a reference to where you are using an array on a variable you defined as a single value previously. Hope this helps!
Powered by Yahoo! Answers