foreach ($employee as $value) {
echo ' <div class="new-form" data-employee-id="'.$value['id_employee'].'">
<input type="text" disabled value="'.$value['first_name'].'">
<input type="text" disabled value="'.$value['second_name'].'">
<input type="text" disabled value="'.$value['middle_name'].'">
<select name="list-position" id="list-position">';
foreach ($positions as $val) {
echo '<option value="'.$val['id_position'].'">'.$val['position'].'</option>';
}
// echo забыл
echo '</select>
<input type="text" disabled value="'.$value['position'].'">
<input type="text" disabled value="'.$value['salary'].'">
<button class="change-employee" data-id="'.$id.'">Изменить</button>
<button id="js-save-change-employee" class="save-change-employee hide" data-id="'.$id.'">Сохранить изменения</button>
</div>';
}
Но нафига так писать??? Можно же красиво всё оформить и не ломать глаза
<?php foreach ($employee as $value) { ?>
<div class="new-form" data-employee-id="<?= $value['id_employee'] ?>">
<input type="text" disabled value="<?= $value['first_name'] ?>">
<input type="text" disabled value="<?= $value['second_name'] ?>">
<input type="text" disabled value="<?= $value['middle_name'] ?>">
<select name="list-position" id="list-position">';
<?php foreach ($positions as $val) { ?>
<option value="<?= $val['id_position'] ?>"><?= $val['position'] ?></option>
<?php } ?>
</select>
<input type="text" disabled value="<?= $value['position'] ?>">
<input type="text" disabled value="<?= $value['salary'] ?>">
<button class="change-employee" data-id="<?= $id ?>">Изменить</button>
<button id="js-save-change-employee" class="save-change-employee hide" data-id="<?= $id ?>">Сохранить изменения</button>
</div>
<?php } ?>
ЗЫ. Местная подсветка, конечно, убивает всю прелесть, но редакторы нормально подсвечивают.