inside the loop, assign the cart values to your variable. for example:
$myVariable = "";
while (!$eCart1->EOF()){
$myVariable = $myVariable . "Quantity: " . $eCart1->DisplayInfo("Quantity") . " Name: " . htmlentities($eCart1->DisplayInfo("Name")) . " ";
$eCart1->MoveNext();