Multidimensional array sort?

Use ksort($projectsByYear)

Of course every time you add something to the array it will need to be resorted.

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