1

Umlauts like äöü work. Strangely, after the umlauts there are special symbols. I can't get rid of these. It is set in UTF-8. Is it possible to deactivate the special characters in the result (echo).

I added an imageenter image description here

Here the last part of my query: I only have the problem with the query echo ($row['info2']); Maybe there is a way to edit only this series


    $options = array("FormatDecimals" => true);
    $result = sqlsrv_query($conn, $query, null, $options);
            
    $i='';
    $trenner = '';
    
    while($row=sqlsrv_fetch_array($result)) {
        /**echo "<tr class=grey>";**/
        if ($row['plan_auftrag'] != $trenner) { 
        
            echo "<tr class=blue>";
                echo "<td colspan=13>";
                echo $row['plan_auftrag'];      
                echo "</td>";   
            echo "</tr>";
        }   
    
        if (in_array($row['aunr'], $neues_array_bereit)) {
            echo "<tr class=gruen style=\"text-align: center\">";   
        } else if (in_array($row['aunr'], $neues_array_nichtbereit)) {
            echo "<tr class=orange style=\"text-align: center\">"; 
        } else {
            echo "<tr class=grey style=\"text-align: center\">";    
        }
        echo "<td>";
        
            echo "<form action=\"fimi3.php\" method=\"get\">";
                echo "<select name=\"status\" required onchange=\"this.form.submit()\">";
                    echo "<option value=\"\" >$row[aunr]</option>";
                    echo "<option value=\"1\">gebaut</option>";
                    echo "<option value=\"2\">gerechnet</option>";
                    echo "<option value=\"5\">Status löschen</option>"; 
                    echo "</select>";
                    echo "<input type=\"hidden\" name=artikel value=\"$row[aunr]\">";
                    echo "<input type=\"hidden\" name=\"aktsenden\" value=\"senden\">";
    
            echo "</form>";
        echo "</td>";
            
        echo "<td>";
            echo substr($row['kunden_bez'] , 8);
        echo "</td>";
            
        echo "<td>";  
            echo substr($row['soll_menge_pri'] , 0, -7);
        echo "</td>";
            
        echo "<td>";    
            echo substr($row['user_f_25'] , 0, -4);
            echo ' X ';
            echo substr($row['user_f_26'] , 0, -4);
        echo "</td>";
            
        echo "<td>";
            echo $row['user_c_55'];
        echo "</td>";
    
        echo "<td>";
            echo $row['user_c_56'];
        echo "</td>";
            
        echo "<td>";
            echo $row['user_c_49'];
        echo "</td>";
    
        echo "<td>";
            echo $row['user_n_07'];
        echo "</td>";
             
        echo "<td>";
            echo $row['user_n_08'];
        echo "</td>";
        
        echo "<td>";
            echo "<a target=blank href=\"../Verpackung/$row[user_c_47].pdf\">$row[user_c_47]</a>";
        echo "</td>";   
        
        echo "<td>";
            echo substr($row['erranf_dat']->format('d.m.Y H:i:s:u'), 0, -16);
            echo "<br />";
        echo "</td>";
        
        echo "<td>";
            echo gmdate("H:i", $row['erranf_zeit']);
        echo "</td>";
        
        echo "<td>";
        
        if ($row['a_status']=="E") {
            echo "beendet";
        } else if ($row['a_status']=="L") {
            echo "laufend";
        } else if ($row['a_status']=="V") {
            echo "vorbereitet";
        } else if ($row['a_status']=="U") {
            echo "unterbrochen";
        }
                
        echo "</td>";
        if ($row['aunr'] != $trenner) { 
        
            echo "<tr class=grey>";
                echo "<td colspan=13>";
                echo 'HINWEISE:   ';
                echo ($row['info2']);
            echo "</td>";
                    
            echo "</tr style=\"text-align: center\">"; 
        }
                
        echo "</tr>";
        
        $trenner = $row['plan_auftrag'];        
    
    }
}
?>

</table>
</section>
</article>
</html>
</body>

Thank you

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Rene
  • 59
  • 3
  • Did you make sure you have [UTF-8 All the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – RiggsFolly Sep 15 '22 at 15:03
  • Good code indentation would help us read the code and more importantly it will help **you debug your code** [Take a quick look at a coding standard](https://www.php-fig.org/psr/psr-12/) for your own benefit. You may be asked to amend this code in a few weeks/months and you will thank me in the end. – RiggsFolly Sep 15 '22 at 15:09

0 Answers0