如何在循环sql查询中使用ini的内容

I am trying to use a ini file which contains a list of windowspc names to use in an oracle sql query.

I am able to retrieve the values in the ini but when i try to use the value in the query i get Notice: Array to string conversion in C:\xampp\htdocs\MachineJob.php on line 22

and when i include the query into the while request i get Warning: Illegal string offset 'WINDOWS' in C:\xampp\htdocs\MachineJob.php on line 16

Warning: Illegal string offset 'MACHINE2' in C:\xampp\htdocs\MachineJob.php on line 16 A

<?php
include 'oracon.php';

$i =1;

$win = parse_ini_file('machines.ini',true);

while($i <= 27){
echo $win['WINDOWS']['MACHINE'.$i] ;
$i++;
}

$query1 = ('select * from v$session where terminal = :win');
$result1 = oci_parse($conn, $query1);
oci_bind_by_name($result1, ':win', $win);
oci_execute($result1);

$query2 = oci_parse($conn, 'select m.machinename, j.workorderid, j.qtytoproduce, startdate, j.progressreport from job j, machine m where j.status <>600 and j.machineid = m.machineid');
oci_execute($query2);

$row1 = oci_fetch_array($result1);
echo "<table>
<tr class=\"TableHeading-CSS\">
<th class=\"TableHeading-CSS\">Machine Name</th>
<th class=\"TableHeading-CSS\">Workorder</th>
<th class=\"TableHeading-CSS\">QTY</th>
<th class=\"TableHeading-CSS\">Started</th>
<th class=\"TableHeading-CSS\">Progress</th>
<th class=\"TableHeading-CSS\">Operator</th>
</tr>";

while($row2 = oci_fetch_array($query2)){
echo "<tr class=\"Table-CSS\">";
echo "<td class=\"Table-CSS\">" . $row2['MACHINENAME'] . "</td>";
echo "<td class=\"Table-CSS\">" . $row2['WORKORDERID'] . "</td>";
echo "<td class=\"Table-CSS\">" . $row2['QTYTOPRODUCE'] . "</td>";
echo "<td class=\"Table-CSS\">" . $row2['STARTDATE'] . "</td>";
echo "<td class=\"Table-CSS\">" . $row2['PROGRESSREPORT'] . "</td>";
echo "<td class=\"Table-CSS\">" . $row1['USERNAME'] . "</td>";
echo "</tr>";}
echo "</table>";
?>

Machine ini contents

[WINDOWS]

MACHINE1 = FHMTESTDC01-JMS 
MACHINE2 = FHMDC0002-JMS 
MACHINE3 = FHMDC0003-JMS 
MACHINE29 =FHMDC0029-JMS 

[DBNAME]

MACHINE1 = TESTDC01
MACHINE2 = DC9k02
MACHINE3 = DC9k03
etc