A little stuck

OK, so I have an output in xml format like such:

 

Array
(
    [0] => Array
        (
            [value] => 232
            [label] => For Sale
        )

    [1] => Array
        (
            [value] => 233
            [label] => Learning
        )

    [2] => Array
        (
            [value] => 15
            [label] => Autos
        )

    [3] => Array
        (
            [value] => 16
            [label] => Real Estate
        )

    [4] => Array
        (
            [value] => 234
            [label] => Services
        )

    [5] => Array
        (
            [value] => 12
            [label] => Community
        )

    [6] => Array
        (
            [value] => 235
            [label] => Jobs
        )

    [7] => Array
        (
            [value] => 17
            [label] => Personals
        )

)



I have this code to get the info from the array:

foreach ($details as $element) {
  foreach($element as $key => $val) {
      $cats .= "{$key}: {$val} <br>";
  }
}


But, the output that is displayed is:



value: 232
label: For Sale
value: 233
label: Learning
value: 15
label: Autos
value: 16
label: Real Estate
value: 234
label: Services
value: 12
label: Community
value: 235
label: Jobs
value: 17
label: Personals

 

I only need the labels to show - not the values. I forgot how. Can anyone assist?

caredesign.net
Quote · 28 Feb 2016

Find :

 

    $cats .= "{$key}: {$val} <br>";


Replace with :

 

   if($key=='value') continue;
   $cats .= "{$key}: {$val} <br>";

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 28 Feb 2016

 Thanks

Find :

 

    $cats .= "{$key}: {$val} <br>";


Replace with :

 

   if($key=='value') continue;
   $cats .= "{$key}: {$val} <br>";

 

caredesign.net
Quote · 28 Feb 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.