How can I access ‘key’ and ‘value’ from an array in a for loop?

If I am understanding you correctly just change

<?php $count=1;foreach ($value['options'] as $key => $option) { ?>

and you can access the key from $key.

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