Getting Taxonomy inside WP_Query Loop

The first problem with your code, I guess, is that you use get_the_taxonomies function, which will:

Retrieve all taxonomies of a post with just the names.

So its result will be like this:

Array
(
    [0] => category
    [1] => post_tag
    [2] => post_format
)

And I’m pretty sure that you want to get terms assigned to given post from all taxonomies, and not the taxonomies names…

So most probably you want to do something like this:

$terms = wp_get_object_terms( get_the_ID(), array_keys( get_the_taxonomies() ) );
foreach ( $terms as $i => $term ) {
    echo ($i ? ', ' : '') . $term->name;
}

And quick answers to your questions:

  1. One of possible solutions above – it’s hard to say if it’s the best one.
  2. No, your method is not a solution, I guess.
  3. There is no need to use regex. You should avoid using regex when there is no need for that.
  4. You can get rid of hyperlinks by getting term objects and printing them by yourself (as shown above).

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