0

I have an Array printed by this code:

echo htmlspecialchars(print_r($variable, true));

Current output is the following:

Array
(
    [querywords] => 44
    [cost] => 0.03
    [count] => 22
    [result] => Array
        (
            [0] => Array
                (
                    [index] => 1
                    [url] => https://example.com/
                    [title] => Libri Italiano
                    [textsnippet] => ...  
                    [htmlsnippet] => 
                    [minwordsmatched] => 42
                    [viewurl] => http://view2.example.com/compare/kh2dgbb87w/1
                )

            [1] => Array
                (
                    [index] => 2
    ...

What is the correct PHP code to echo these values?

[cost] (for main level only)

[title] (for each sublevel)

marya
  • 119
  • 2
  • 2
  • 10

0 Answers0