escaping output in CodeIgniter |
07-24-2017, 10:56 AM
(This post was last modified: 07-24-2017, 11:05 AM by PaulD. Edit Reason: Clarification )
Assuming you have turned your object into an array it should work without looping if you wanted to do it in the controller.
Here is the function from common.php PHP Code: if ( ! function_exists('html_escape')) So you should be fine with: PHP Code: $data['user'] = html_escape($query->result_array()); Paul PS Isn't that a beautifully coded function. I love learning how to code better from the CI Core... |
Messages In This Thread |
escaping output in CodeIgniter - by june123 - 07-24-2017, 04:27 AM
RE: escaping output in CodeIgniter - by Martin7483 - 07-24-2017, 06:16 AM
RE: escaping output in CodeIgniter - by june123 - 07-24-2017, 08:00 AM
RE: escaping output in CodeIgniter - by Martin7483 - 07-24-2017, 08:09 AM
RE: escaping output in CodeIgniter - by PaulD - 07-24-2017, 10:56 AM
RE: escaping output in CodeIgniter - by june123 - 07-25-2017, 04:44 AM
RE: escaping output in CodeIgniter - by Martin7483 - 07-25-2017, 05:12 AM
RE: escaping output in CodeIgniter - by june123 - 07-25-2017, 10:31 PM
|