Custom Query returns array, but I can’t see it’s elements

I can’t comment due to low reputation so sorry for posting this as an answer, but you are missing $ (dollar sign) near groupcat[0]

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