0

Hello i have form with nested repeater field, all data in nested repeater group saving in database like this: a:6:{i:0;a:4:{s:5:"title";s:21:"Initial ";s:11:"description";s:78:"Please show identify.";}}

in database all ok, but how i can get title value, description value, when i try get via get_post_meta, for example:
get_post_meta( get_the_ID(), 'part_0_module[0][title], true ) - nothing, part_0_module[0][title] - this my field name.

Can you help me solve this problem and get data?

1 Answer 1

0

You should use unserialize() function to access data.

For example:

<?php
$data = get_post_meta( get_the_ID(), 'field_name', true );
$data = unserialize($data);

// Print the data
print_r($data);
1
  • get_post_meta(); Should handle unserializing. Aug 30, 2017 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.