[Vuejs]-How to return data from database normally when the input has been sanitized?

0👍

For php you can use the json_encode() function:

public function getSomeData() {
    ...
    return json_encode('Sample & 'Code');
}

my assumption here is that if you did a var_dump('Sample & 'Code'), it would print out 'Sample & 'Code'

Leave a comment