Dylanh schreef:Als jeQuote:
Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. This function returns a string with these conversions made. If you require all input substrings that have associated named entities to be translated, use htmlentities() instead.
Codeblok (voorbeeld.php):
1
Test
ipv Test wil dan htmlspecialchars();
Wil je
Codeblok (voorbeeld.php):
1
Test
als output htmlentities();
Daarom gebruik ik altijd htmlentities();
Toen ik ik php code, gebruikte ik vaker htmlspecialchars, want die accepteert special chars zoals hartjes (dan niet <3 oid maar zn speciaal teken wat je oa onder die alt toetsen op windows hebt zitten)
)