Yapmak istediğinizi yanlış anlamadıysam 2 tane örnek fonksiyon paylaştım.

header('Content-type: text/html; charset="UTF-8"');
function recursive_func($q, $filter_terms) {
    $terms = [];
    $filter_terms[] = $q;
    $filter_terms = array_unique($filter_terms);

    $google = 'http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=' . urlencode($q);
    $baglanti = file_get_contents($google);
    preg_match_all('#<suggestion data="(.*?)"/>#Ssie',$baglanti,$suggetions);

    if(count($suggetions[1]) > 1) {
        foreach ($suggetions[1] as $suggetion){
            $suggetion = iconv('ISO-8859-9', 'UTF-8', $suggetion);
            if($suggetion != $q && in_array($suggetion, $filter_terms) === false) {
                $term = [];
                $term['name'] = $suggetion;
                $term['child'] = recursive_func($suggetion, $filter_terms);
                $terms[] = $term;
            }

        }
    }
    //print_r($terms);
    return $terms;
}
$results = recursive_func('kelime oyunu oyna bedava', []);
print_r($results);
bu fonksiyon ile kelimeye ait tüm sonuçları listeleyebilirsiniz, fakat her kelimenin bir önerisi daha çıktığı için bu işlem çok uzun sürecektir.

header('Content-type: text/html; charset="UTF-8"');
function recursive_func2($q, $filter_terms) {

    $terms = [];

    $filter_terms[] = $q;
    $filter_terms = array_unique($filter_terms);

    $google = 'http://suggestqueries.google.com/complete/search?output=toolbar&hl=tr&q=' . urlencode($q);
    $baglanti = file_get_contents($google);
    preg_match_all('#<suggestion data="(.*?)"/>#Ssie',$baglanti,$suggetions);

    if(count($suggetions[1]) > 1) {
        $suggetion = iconv('ISO-8859-9', 'UTF-8', $suggetions[1][1]);

        if($suggetion != $q && in_array($suggetion, $filter_terms) === false) {
            $term = [];
            $term['name'] = $suggetion;
            $term['child'] = recursive_func2($suggetion, $filter_terms);

            $terms[] = $term;
        }
    }
    //print_r($terms);
    return $terms;

}
$results = recursive_func2('oyunlar', []);
print_r($results);
die;
bu fonksiyonda ise yukarıdakinden farklı olarak önerilerde çıkan ilk kelimeleri alır ve iç içe bir dizi oluşturur.

Dizi yapısını siz nasıl kullanmak istiyorsanız ona göre değiştirebilirsiniz.