I'm currently using a custom PHP framework. It has a Class designed to handle interaction with the MYSQL database.
The select function, takes the table and a query, generates rows via mysqli_fetch_array($result, MYSQL_ASSOC) and either returns a regular array (each row is one element in the array) or FALSE if there are no results returned.
I'm thinking about adding the following statement to automatically always remove escaping slashes from the results
$data[] = array_map('stripslashes',$row );
As this class is used all over the application for returning anything from the database, would this be a sensible idea, versus always remembering to output data with stripslashes whenever it's from user or third party input?
Classit will executed for all. Rather execute this whenever needed after fetching data.