How can I sort an array in alphabetical order using PHP on Wordpress CMS?
<?php if( count($terms_array) > 0 ) : foreach($terms_array as $term) : ?>
<?php
$term = '';
$args = array(
'post_type' => 'book',
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
);
$books_query = new WP_Query( $args );
?>
<?php if ( $books_query->have_posts() ) : ?>