ACF – Get ID of relationship field in flexible content

Editing the custom field itself would be the easiest way. In the field, under “Return Format,” you can change it from Post Object to Post ID. That way, when you call for the data, you’ll already have an array of just the IDs.

If you’re not able to change the field for some reason, you could alternatively code it something like

<?php
if (have_rows('studio_blocs')) {
    while(have_rows('studio_blocs')) {
        the_row();
        $news = get_sub_field('studio_bio_list');
        if ($news) {
            foreach($news as $item) {
                $array[] = $item->ID;
            }
        }
    }
    print_r($array);
}
?>

but you’re adding a little processing overhead, so changing the field is the better solution.

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