Title: Some Examples &#8211; Documentation
Last modified: February 15, 2020

---

# Some Examples – Documentation

 *  [tbsworks](https://wordpress.org/support/users/tbsworks/)
 * (@tbsworks)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/some-examples-documentation/)
 * _Note – I am using the ACF field in theme options – if not being used in options
   then you can use the normal get\_field( ‘your\_field\_name’) without the –>> ,‘
   option’ _
    **To see the Array printed in a Human friendly view:**
 *     ```
       <?php
       echo '<pre>'.print_r(get_field( 'your_field_name', 'option'), true).'</pre>';
       ?>
       ```
   
 * **To see the entire array: **
 *     ```
       <?php 
           $google_1 = get_field( 'your_field_name', 'option' );
           var_dump($google_1);
       ?>
       ```
   
 * **IN USE:**
    place at the top of your page or call from somewhere
 *     ```
       <?php
           $google_1 = get_field( 'your_field_name', 'option');
           //Inner Arrays
           $vars = $google_1['variants'];
           //Not necessary in the US because latin is the Google default
           $subs = $google_1['subsets'];
           // Get all array items - comma separated
           $vars_string = rtrim(implode(',', $vars), ',');
           $subs_string = rtrim(implode(',', $subs), ',');
       ?>
       ```
   
 * **CALL OUT:**
 *     ```
       <style>
       @import url('https://fonts.googleapis.com/css?family=<?php echo $google_1['font'] ?>:<?php echo $vars_string ?>&display=swap&subset=<?php echo $subs_string ?>');
       </style>
       ```
   
 * OR
    `<link href="https://fonts.googleapis.com/css?family=<?php echo $google_1['
   font'] ?>:<?php echo $vars_string ?>&display=swap&subset=<?php echo $subs_string?
   >" rel="stylesheet">`
 * I hope that helps someone
    Cheers
    -  This topic was modified 6 years, 3 months ago by [tbsworks](https://wordpress.org/support/users/tbsworks/).

The topic ‘Some Examples – Documentation’ is closed to new replies.

 * ![](https://ps.w.org/acf-google-font-selector-field/assets/icon-256x256.png?rev
   =1141057)
 * [ACF: Google Font Selector](https://wordpress.org/plugins/acf-google-font-selector-field/)
 * [Support Threads](https://wordpress.org/support/plugin/acf-google-font-selector-field/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-google-font-selector-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-google-font-selector-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-google-font-selector-field/reviews/)

## Tags

 * [example](https://wordpress.org/support/topic-tag/example/)
 * [examples](https://wordpress.org/support/topic-tag/examples/)
 * [how-to](https://wordpress.org/support/topic-tag/how-to/)
 * [usage](https://wordpress.org/support/topic-tag/usage/)

 * 0 replies
 * 1 participant
 * Last reply from: [tbsworks](https://wordpress.org/support/users/tbsworks/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/some-examples-documentation/)
 * Status: not resolved