"; $query = mysqli_query($link,"select * from type_detals where id_type='$idmachine'"); while ($res = mysqli_fetch_array($query)) { $nameid=$res['id']; $namedetals=$res['name_detals']; $type=$res['type']; $typeid="type".$nameid; $count=$res[$type]; echo "
"; } echo "
"; } ?>