Used to do some digging and that i realize that the array means you will find multiple values returning from the query. From another publish I discovered print_r so I saw the values. How do you return among the values though?

This:

<?php 

    $category = get_the_category();
    $parent = get_cat_name($category[0]->category_parent);
    $cat_name = get_the_category($category[cat_name]);
    echo 'category' . $category . '<br />';
    echo 'parent: ' . $parent . '<br />';
    echo 'Cat Name: ' . $cat_name . '<br />';

    print_r ($cat_name);

    ?>

Returns this:

categoryArray
parent: Location
Cat Name: Array
Array ( [0] => stdClass Object ( [term_id] => 11 [name] => nashville [slug] => nashville [term_group] => 0 [term_taxonomy_id] => 11 [taxonomy] => category [description] => [parent] => 8 [count] => 1 [object_id] => 20 [cat_ID] => 11 [category_count] => 1 [category_description] => [cat_name] => nashville [category_nicename] => nashville [category_parent] => 8 ) )

How do you make $cat_title return nashville? cat_title = nashville based on the print_r function. This can be a wordpress site in the event that is important, however i am speculating this can be a simple coding question.

You are really coping with an item there, the first element in a wide array.

Note it states Array ( [0] => stdClass Object (

Make use of the square brace syntax to gain access to array people

$array_name['key_name']

And also the arrow for objects qualities

$object->property_name

So within this situation,

$category[0]->cat_name

is 'nashville'.

I really hope this can help, it appears like you are just asking how you can access the worthiness from an assortment, correct me if I am wrong. But to obtain the cat_title out of your category array, the syntax could be

$category['cat_name'];

With this particular you have access to the worthiness.

echo $category['cat_name'];

Should print it towards the screen.