$rows="";
while($row=mysql_fetch_assoc($result)){
$modx->setPlaceholder('firstname',$row['firstname']);
$modx->setPlaceholder('lastname',$row['lastname']);
$rows .= $modx->getChunk('myRow');
}
$modx->setPlaceholder('rows',$rows);
return $modx->getChunk('table');
$params = array();
$params['param1'] = 'value1';
$params['param2'] = 'value2';
$row = $modx->parseChunk('rowChunk', $params, '[+','+]');
when you getChunk in a snippet it retrieves the chunk but it doesn’t replace the placeholders there and then, that happens after the snippet has run.Yep, absolutely correct
To replace placeholders of a chunk within the snippet then use parseChunk.