I fetch $pmpro_levels from postmeta as:
when i try print_r($pmpro_levels); I have array like this:
$pmpro_levels=Array
(
[2] => stdClass Object
(
[id] => 2
[name] => PREMIUM
[description] => <h4 style="text-align: center"><strong>3 Mois</strong></h4>
<p style="text-align: center">7€ /mois</p>
<p style="text-align: center"><span style="color: #000000">soit 0,70€ par jour</span></p>
)
[3] => stdClass Object
(
[id] => 3
[name] => GOLD
[description] => <h4 style="text-align: center"><strong>6 Mois</strong></h4>
<p style="text-align: center">6€ /mois</p>
<p style="text-align: center"><span style="color: #000000">soit 0,20€ par jour</span></p>
)
[5] => stdClass Object
(
[id] => 5
[name] => MINI
[description] => <h4 style="text-align: center"><strong>1 Mois</strong></h4>
<p style="text-align: center">10€ /mois</p>
<p style="text-align: center"><span style="color: #000000">soit 0,33€ par jour</span></p>
));
and i dont know how to traverse it, and how could I get array like this
Array
(
[2] => string data not object
[3] => string data not object
[5] => string data not object
)
Any idea how can I do this? I would like to have an array without object. Do we have to use jason? I a newbie in PHP.