get_the_tags() not iterating through for/while loop, but will with foreach

get_the_tags() returns an array but the indexes do not start at 0 because they are the term ids.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)