This function returns all categories as an array of the current post or page or the designated post or page.
get_the_category( $id )
ParameterDetails$id(int) (Optional) default to current post ID. The post ID.
Please note that get_the_category() returns an array, which means that you c...