-1
```
  1. table = postmeta

  2. post_id = '1521';

  3. meta_key = 'store_data';

  4. meta_value = 'holiday_dates';

  5. s:16:"holiday_dates";a:9:{i:12396;s:10:"2021/04/13";i:535943;s:10:"2021/04/14";i:271520;s:10:"2021/04/15";i:804617;s:10:"2021/04/21";i:515516;s:10:"2021/04/30";i:476758;s:10:"2021/04/19";i:355992;s:10:"2021/04/28";i:862607;s:10:"2021/05/17";i:616642;s:10:"2021/05/12";

jmart
  • 1
  • 2
  • in your sample `meta_value` is a string, how do you want to get in any order? – biesior Apr 18 '21 at 15:50
  • Hi, it's not possible? What I have is $holiday_dates = get_post_meta(1521,'holiday_dates'); – jmart Apr 18 '21 at 16:08
  • TBH I have even no idea what your problem is you show us some portions of your data, without code and explaining what exactly you want achieve, fix your question if you want to get any valuable help. – biesior Apr 18 '21 at 16:16

1 Answers1

0

Got it, works for me.

$holiday_dates = get_post_meta(1521,'holiday_dates');

sort($holiday_dates);

sort() - sort arrays in ascending order

rsort() - sort arrays in descending order

jmart
  • 1
  • 2