add_action('wp_ajax_ybr_client_results', 'ybr_client_results');
add_action( 'wp_ajax_nopriv_ybr_client_results', 'ybr_client_results' );

function ybr_client_results() {
    $client_details = $_POST[ 'client_details' ];
    return $client_details;
 echo ybr_client_results();

it returns value with 0. how to fix it.

Read more here: WordPress Admin ajax request return value with 0 when echo outside of the function


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: