strings in php are arrays, but not in the same extension as in c.
generally, look at php strings as if they weren't arrays.
then there's one exception: you can access single characters via the array notation:
$thing = "abc";
echo $thing[1]; // output: b
and that's all the parallels AFAIK.
e.g. count (count array elements) doesn't work on strings - only strlen.
a common pitfall: if you access stored data one array level too deep, you get one character of the string instead of an error message. this is able to drive you crazy 😉
I think your problem is about this.