Select phpQuery选择文档的方式是否正确?

Select phpQuery选择文档的方式是否正确?,select,switch-statement,document,multiple-instances,phpquery,Select,Switch Statement,Document,Multiple Instances,Phpquery,请帮帮我 使用phpquery在文档之间切换的正确方法是什么? /* fetch section html */ $secdoc = phpQuery::newDocumentHTML($html, 'utf-8'); /* ................ */ /* .. some actions. */ /* ................ */ while (cur < max) { $soldoc = phpQuery::newDocumentHTML($html,

请帮帮我

使用phpquery在文档之间切换的正确方法是什么?

/* fetch section html */
$secdoc = phpQuery::newDocumentHTML($html, 'utf-8');

/* ................ */
/* .. some actions. */
/* ................ */

while (cur < max)
{
    $soldoc = phpQuery::newDocumentHTML($html, 'utf-8');
    phpQuery::selectDocument($soldoc);

    /* ................ */
    /* .. some actions. */
    /* ................ */

    phpQuery::selectDocument($secdoc);
}
/*获取部分html*/
$secdoc=phpQuery::newDocumentHTML($html,'utf-8');
/* ................ */
/* .. 一些行动*/
/* ................ */
而(电流<最大值)
{
$soldoc=phpQuery::newDocumentHTML($html,'utf-8');
phpQuery::selectDocument($soldoc);
/* ................ */
/*…一些行动*/
/* ................ */
phpQuery::selectDocument($secdoc);
}