I don't think you can. You have to pass some valid values to the 2
middle vars, even if those values will be php's defaults.
If you're going to use those settings frequently, maybe you could
write a wrapper around that function
function myhtmlspecialchars($variable) {
return htmlspecialchars($variable, ENT_COMPAT,'ISO-8859-1', false);
}
Matias Gertel
Freelance Web Development & Coding
e: [email protected]
m: +64 21 288 8840
p: +64 9 838 3367
On 9/06/2009, at 1:55 PM, Nick Le Mouton wrote:
What's the best way to do this? I want to use htmlspecialchars on a
variable, keep the middle two parameters using the php defaults and
change the default setting on the last parameter.
This is what I have been doing:
htmlspecialchars($variable, null, null, false);
But I've just found that this screws up when trying to encode double
quotes (for some reason).
Can anyone suggest a better way?
Nick
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---