why would this
$trader_details = array_walk($trader_details, 'htmlspecialchars');
give this error?
Severity: Warning
Message: htmlspecialchars() expects parameter 2 to be long, string given
afaik htmlspecialchars only has optional parameters apart from the input string? this running in codeigniter
thx
The callback function passed to
array_walkexpects the second parameter to be the key of the array element:But
htmlspecialcharsexpects the second parameter to be the quoting style (typically specified by one of theENT_*constants of the type integer).Try
array_mapinstead. It just uses the array’s values.