my code:
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$data = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface')->getValue('bootsgrid_deliverydate/general/mapping_date');
print_r($data);
?>
output:
'a:3:{
s:18:"_1550496532530_530";
a:1:{s:6:"field1";s:10:"27-02-2019";}
s:18:"_1550641096153_153";
a:1:{s:6:"field1";s:10:"26-02-2019";}
s:18:"_1550641100928_928";
a:1:{s:6:"field1";s:10:"28-02-2019";}
}'
How to get a date alone?
another output:
a:3:{s:18:"_1550664988208_208";a:2:{s:6:"field1";s:7:"9:30 AM";s:6:"field2";s:7:"2:30 AM";}s:18:"_1550735728909_909";a:2:{s:6:"field1";s:7:"3:30 AM";s:6:"field2";s:7:"6:30 AM";}s:18:"_1550735856179_179";a:2:{s:6:"field1";s:7:"6:30 AM";s:6:"field2";s:7:"9:30 AM";}}
how can i get a field1 and field2 value in same array
link;
Best Answer
Try this:
or this one using foreach