将数组转换为stdClass

时间:2015-04-10 08:38:02

标签: codeigniter

我得到的结果如下。我想打印问题和cat_id但不知道如何???实际上我是codeigniter的新手。任何帮助将不胜感激。

Array
(
    [data] => Array
    (
        [0] => Array
            (
                [records] => Array
                    (
                        [0] => stdClass Object
                            (
                                [qst_id] => 1
                                [question] => Describe a major change that occurred in a job that you held.  How did you adapt to this change?
                                [cat_id] => 1
                            )

                        [1] => stdClass Object
                            (
                                [qst_id] => 2
                                [question] => Tell about a situation in which you had to adjust to changes over which you had no control. How did you handle it?
                                [cat_id] => 1
                            )

                    )

                [cat_id] => 1
            )

        [1] => Array
            (
                [records] => Array
                    (
                    )

                [cat_id] => 4
            )

        [2] => Array
            (
                [records] => Array
                    (
                        [0] => stdClass Object
                            (
                                [qst_id] => 3
                                [question] => Give an example of a situation where others were intense but you were able to maintain your composure.
                                [cat_id] => 6
                            )

                    )

                [cat_id] => 6
            )

    )

)

0 个答案:

没有答案