This is within the loop.
I'm trying to create an array by getting the number of tags from each post and counting them, then outputting the result (just to check that everything works)
What am I doing wrong?
$counttags=array();
$posttags=array();
$posttags = get_the_tags();
$counttags[]= count($posttags);
Then, outside the loop
foreach( $counttags as $key => $value){
echo "$key, $value <br />";