WordPress.org

Ready to get started?Download WordPress

Forums

How To Extract data (2 posts)

  1. darylwelch
    Member
    Posted 2 years ago #

    I'm fairly new to WordPress, but have a programming background. I need to extract some data from a custom post. The post data resembles what I see in the wp_options table, for instance:
    a:2:{i:407712721;a:4:{s:5:"title";s:0:"";s:5:"count";b:0;s:12:"hierarchical";b:0;s:8:"dropdown";b:0;}s:12:"_multiwidget";i:1;}

    Is there a page in the Codex, or an article that would help me interpret how to extract data stored in WordPress in a fashion like what is shown above?

    Thanks
    Daryl

  2. Blackbird Interactive
    Member
    Posted 2 years ago #

    The string you see is serialized. Use unserialize()

    You can do a get_post() to get the post as an object.

    These ay help you has well.. Let wordpress do all the work!
    Here

    Here

Topic Closed

This topic has been closed to new replies.

About this Topic