title: SPHINX search php query, how to display results from an array?
body: <p>Im beginning to learn sphinx search php api  </p>
  
  <p>after running this query  </p>
  
  <pre><code>   &lt;?php
    include('sphinxapi.php');
    $cl = new SphinxClient();
    $cl-&gt;SetServer( "192.168.0.100", 9312 );
    $cl-&gt;SetMatchMode( SPH_MATCH_ANY  );
    $result = $cl-&gt;Query( "mimmi",  "searchtest" );
  
    if ( $result === false ) {
        echo "Query failed: " . $cl-&gt;GetLastError() . ".\n";
    }
    else {
        if ( $cl-&gt;GetLastWarning() ) {
            echo "WARNING: " . $cl-&gt;GetLastWarning() . "
  ";
        }
  
        if ( ! empty($result["matches"]) ) {
            foreach ( $result["matches"] as $doc =&gt; $docinfo ) {
                  echo "$doc\n";
            }
  
            print_r( $result );
        }
    }
  
    exit;
  ?&gt;   
  </code></pre>
  
  <p>how can i display the results properly, it shows up output like this  </p>
  
  <pre><code>2183 3262 5256 7812 838 1475 1701 6184 1816 Array ( [error] =&gt; [warning] =&gt; [status] =&gt; 0 [fields] =&gt; Array ( [0] =&gt; namn [1] =&gt; title [2] =&gt; identification_text [3] =&gt; id [4] =&gt; namn [5] =&gt; title [6] =&gt; identification_text [7] =&gt; description ) [attrs] =&gt; Array ( ) [matches] =&gt; Array ( [2183] =&gt; Array ( [weight] =&gt; 6 [attrs] =&gt; Array ( ) ) [3262] =&gt; Array ( [weight] =&gt; 6 [attrs] =&gt; Array ( ) ) [5256] =&gt; Array ( [weight] =&gt; 6 [attrs] =&gt; Array ( ) ) [7812] =&gt; Array ( [weight] =&gt; 6 [attrs] =&gt; Array ( ) ) [838] =&gt; Array ( [weight] =&gt; 4 [attrs] =&gt; Array ( ) ) [1475] =&gt; Array ( [weight] =&gt; 4 [attrs] =&gt; Array ( ) ) [1701] =&gt; Array ( [weight] =&gt; 4 [attrs] =&gt; Array ( ) ) [6184] =&gt; Array ( [weight] =&gt; 4 [attrs] =&gt; Array ( ) ) [1816] =&gt; Array ( [weight] =&gt; 2 [attrs] =&gt; Array ( ) ) ) [total] =&gt; 9 [total_found] =&gt; 9 [time] =&gt; 0.001 [words] =&gt; Array ( [mimmi] =&gt; Array ( [docs] =&gt; 9 [hits] =&gt; 46 ) ) )  
  </code></pre>
  
  <p>i don't know what to make out of it, how do i display the results.</p>