Array-Fast Search output contains a special object array converted to a generic PHP array

Source: Internet
Author: User
Just in the use of fast search, produced a result of array A, which contains a quick search of the special object, can not be directly used to display the output. How can I convert it to a general array B containing ordinary object?

Thank you!

Array A:

Array ( [0] => XSDocument Object ( [_data:XSDocument:private] => Array ( [id] => 65 [message] => cool book awesome [username] => lost guy [book] => my love....[1] => XSDocument Object ( [_data:XSDocument:private] => Array ( [id] => 78 [message] => cool book awesome [username] => lost guy [book] => my love....)

I want to get the array B look like:

Array ( [0] => StdClass Object ( Array ( [id] => 65 [message] => cool book awesome [username] => lost guy [book] => my love....[1] => StdClass Object ( Array ( [id] => 78 [message] => cool book awesome [username] => lost guy [book] => my love....)

Thank you! Thanks a lot!

Reply content:

Just in the use of fast search, produced a result of array A, which contains a quick search of the special object, can not be directly used to display the output. How can I convert it to a general array B containing ordinary object?

Thank you!

Array A:

Array ( [0] => XSDocument Object ( [_data:XSDocument:private] => Array ( [id] => 65 [message] => cool book awesome [username] => lost guy [book] => my love....[1] => XSDocument Object ( [_data:XSDocument:private] => Array ( [id] => 78 [message] => cool book awesome [username] => lost guy [book] => my love....)

I want to get the array B look like:

Array ( [0] => StdClass Object ( Array ( [id] => 65 [message] => cool book awesome [username] => lost guy [book] => my love....[1] => StdClass Object ( Array ( [id] => 78 [message] => cool book awesome [username] => lost guy [book] => my love....)

Thank you! Thanks a lot!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.