Retrieving multisite blog IDs, somehow failing to foreach them properly

You’re setting $site_blog_ids to be an array of arrays. In that case, you’d want to do foreach ($site_blog_ids[0] as...

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