Home Forums Add-ons Repeater Field generate serialized array?!


generate serialized array?!

  • acf
    i have one repeater field with two datepickers. you see it attached.
    problem 1: i set date format both the same to Y-m-d (see 2nd screenshot). but in database it is saved in another dateformat: Ymd (see 3rd screenshot). why is it saved differently?

    problem 2: i need the data as an array. is it somehow possible to serialize it instead of inserting a new row in the database?!
    ´╗┐´╗┐´╗┐because i want the whole repeater data as one array to save it to another meta field of one post. the array should look like this:

    array (
      0 => 
      array (
        'type' => 'custom',
        'bookable' => 'no',
        'from' => '2015-02-06',
        'to' => '2015-02-14',
      1 => 
      array (
        'type' => 'custom',
        'bookable' => 'no',
        'from' => '2015-02-21',
        'to' => '2015-02-28',
  • solved! get_field() returns me an array and update_field() generates a serialized array

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘generate serialized array?!’ is closed to new replies.