0

in my Flex App, I have a 2-dimensional Array, something like this:

arr[0][0] = "11";
arr[0][1] = "12";

arr[1][0] = "21";
arr[1][1] = "22";

I'm sending this array to my webservice:

amfWebService.doSomethingWithThatArray(arr);

I'm checking the result of the function (which is as string) with an Alert.

Now to my problem: PHP somehow does not recognize the array properly.

To see whats arriving at PHP I've implemented this:

if(is_array($arr))
    if(is_array($arr[0]))
        if(is_array($arr[0][0]))
            return "this can't be true";
        else
            return "no 3 dimensions";
    else
        return "no 2 dimensions";
else
    return "no array";

Now guess what! My Alert shows me "this can't be true", which means that arr[0][0] is recognized as an array and not as "11", which it should.

Anyone has an idea what this is about? Its AMFPHP 1.9 and Flex 3

4

1 回答 1

1

您可以用来print_r()显示结构或$arr. 查找此类问题的最便捷方法 - 在使用适当的调试器之后。

于 2010-02-17T22:39:15.997 回答