[ create a new paste ] login | about

Link: http://codepad.org/u36JJvK2    [ raw code | output | fork ]

PHP, pasted on Sep 16:
<?php

$data = array(
  0 => array(
    'term_id' => 22,
    'name' => 'Aaa Aa',
    'slug' => 'aaa-aa',
    'term_group' => 0,
    'term_taxonomy_id' => 22,
    'taxonomy' => 'category',
    'description' => '',
    'parent' => 13,
    'count' => 0,
    'cat_ID' => 22,
    'category_count' => 0,
    'category_description' => '',
    'cat_name' => 'Aaa Aa',
    'category_nicename' => 'aaa-aa',
    'category_parent' => 13,
  ),
  1 => array(
    'term_id' => 11,
    'name' => 'adasdasda',
    'slug' => 'adasdasda',
    'term_group' => 0,
    'term_taxonomy_id' => 11,
    'taxonomy' => 'category',
    'description' => 'asdsdad',
    'parent' => 1,
    'count' => 0,
    'cat_ID' => 11,
    'category_count' => 0,
    'category_description' => 'asdsdad',
    'cat_name' => 'adasdasda',
    'category_nicename' => 'adasdasda',
    'category_parent' => 1,
  ),
);

for ($i = 0; $i < count($data); $i++) {
    foreach($data[$i] as $key => $value){
        echo "KEY: ".$key."<br />\n VALUE: ".$value."<br />\n"; 
    }
}


Output:
KEY: term_id<br />
 VALUE: 22<br />
KEY: name<br />
 VALUE: Aaa Aa<br />
KEY: slug<br />
 VALUE: aaa-aa<br />
KEY: term_group<br />
 VALUE: 0<br />
KEY: term_taxonomy_id<br />
 VALUE: 22<br />
KEY: taxonomy<br />
 VALUE: category<br />
KEY: description<br />
 VALUE: <br />
KEY: parent<br />
 VALUE: 13<br />
KEY: count<br />
 VALUE: 0<br />
KEY: cat_ID<br />
 VALUE: 22<br />
KEY: category_count<br />
 VALUE: 0<br />
KEY: category_description<br />
 VALUE: <br />
KEY: cat_name<br />
 VALUE: Aaa Aa<br />
KEY: category_nicename<br />
 VALUE: aaa-aa<br />
KEY: category_parent<br />
 VALUE: 13<br />
KEY: term_id<br />
 VALUE: 11<br />
KEY: name<br />
 VALUE: adasdasda<br />
KEY: slug<br />
 VALUE: adasdasda<br />
KEY: term_group<br />
 VALUE: 0<br />
KEY: term_taxonomy_id<br />
 VALUE: 11<br />
KEY: taxonomy<br />
 VALUE: category<br />
KEY: description<br />
 VALUE: asdsdad<br />
KEY: parent<br />
 VALUE: 1<br />
KEY: count<br />
 VALUE: 0<br />
KEY: cat_ID<br />
 VALUE: 11<br />
KEY: category_count<br />
 VALUE: 0<br />
KEY: category_description<br />
 VALUE: asdsdad<br />
KEY: cat_name<br />
 VALUE: adasdasda<br />
KEY: category_nicename<br />
 VALUE: adasdasda<br />
KEY: category_parent<br />
 VALUE: 1<br />


Create a new paste based on this one


Comments: