SwishResults::nextResult

(PECL swish >= 0.1.0)

SwishResults::nextResultGet the next search result

說明

object SwishResults::nextResult ( void )
Warning

本函式是實驗性的。這個函式的行為、名稱、和關於此函式的任何其他文件在未來PHP的發行中可能會在不通知的情況下改變。 使用此函式需自行承擔風險。

回傳值

Returns the next SwishResult object in the result set or FALSE if there are no more results available.

範例

Example #1 Basic SwishResults::nextResult() example

<?php

try {

    
$swish = new Swish("index.swish-e");
    
$search $swish->prepare();

    
$results $search->execute("lost");
    while(
$result $results->nextResult()) {
        
/* do something with the result object */
    
}

} catch (
SwishException $e) {
    echo 
$e->getMessage(), "\n";
}

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top