• I am using a combination of “Event Manager” and “Advanced Custom Fields”.
    Part of the created array is:
    [event_attributes] => Array ( [location] => s:21:”a:1:{i:0;s:4:”2277″;}”;

    I am able to echo s:21:”a:1:{i:0;s:4:”2277″;}”; but I need to get only the 2277 part out as it is the postID for a custom type with details I need query. Is there an easy WordPress way to isolate this data?

    For bonus points => explain the string s:21:”a:1:{i:0;s:4:”2277″;}”; and how it can be used in template development.

Viewing 1 replies (of 1 total)
  • So to me that looks like the way an array is stored in the options table in wordpress wp_options.

    try something along the lines of $event_attr = get_option( 'location' ); or maybe $event_attr = get_option( 'event_attributes' ); and then use var_dump( $event_attr ) to see what the result is.

Viewing 1 replies (of 1 total)
  • The topic ‘Get data out of array’ is closed to new replies.