When i replace the code with your code, i have just the word "category list" at the top on my website
I forgot something ?
Yes, you failed to read my instructions
carefully - I told you that the above code was a sample that would add some
static content:
First, let's populate it with something static.
As suggested, you need to replace the static words 'category list' with actual dynamic content:
Depending on what you actually want, you can now populate the meta tags with dynamic content.
It's not so easy to populate the meta keywords with just the category name, as index.php will display the category overview (so you're not inside a particular category at all), or within a category there might be sub-categories. So, the question is: what is suppossed to go into the meta keywords? The current category you're in?
It seems that you're expecting a ready-to-copy-and-paste solution without looking into the code nor understanding what you do, but this is something I'm not ready to post (yet). I believe in giving users some clues, but making them to come up with their own solution, this way entertaining and educating the user. As a side effect, the user will have to give something back to the community. I want you to try to come up with a partial solution on your own: review the code before the section you've edited so far - you have all the data available inside the array $cat_data. To find out what is stored inside it, do a
print_r($cat_data); somewhere near the code snippet from above - this will create some debugging output with the content of the array.
Paste the output of the temporary debug info into your posting, then comment out the code by putting double slashes in front of it like this
// print_r($cat_data);