如何从数组中获取数值?

I have this following segment in my array.

[genres] => Array
    (
        [0] => Adventure
        [1] => Drama
        [2] => Game
        [3] => Harem
        [4] => Martial Arts
        [5] => Seinen
    )

I am trying to return each of those elements separately.

foreach($t['genres'] as  $tag=>$value) {
    // I don't know what to do from here
}

Can someone help me on how I can print each unique value?

genres is an associative array meaning that the key will only give you the index point of that value. Your values are of type String, not numerical values.

$genres = ['Adventure', 'Drama', 'Game', 'Harem', 'Martial Arts', 'Seinen'];

So in this case, at index point 0 (arrays start at 0), we will get Adventure.

[0] => Adventure

To get these values out of the array one by one you can do this:

foreach($genres as $_genre) {
    echo $_genre;
}

To get these values and/or keys from the array one by one you can do this:

foreach($genres as $_key => $_genre) {
    echo "Index: {$_key} - Value: {$_genre}"
}

Keys are numerical values, they mark the point of the value in that array. For example, if we wanted to get Game from the array:

[2] => Game

We can see that it has an index of 2 and can be called like:

echo $genres[2];