PHP重置mysqli_result

It's my first time posting to stack-overflow, i'm hoping someone can help me figure out what i'm doing wrong. I have the following piece of code that I am having problems resetting the $row array. It's a nested loop, $row works the first time, then is blank on additional loops... any ideas?

/**Setup local variables with passed data**/
$ing = $this->getVariable('ingredients');
$row = $this->getVariable('unitdrop');
$unit= $this->getVariable('unit');

/**Start Displaying data**/
if (!$ing) {print("No ing");}
else
{while ($i = $ing->fetch_array())
{
/**Display $ing Data**/
    if (!$row) {print("No data row");}
    else
    {while($p = $row->fetch_array())
        {
        /**Display $row Data**/
        } 
    }
reset($row); // <-- Does not reset $row to first record
}

Thanks for any assistance!

reset resets an array. $row is an object of class mysqli in your case. Use the method mysqli::data_seek instead (see the example in the link). Should be $row->data_seek(0); I guess.