I'm doing an INSERT into a wordpress table and anything with an apostrophe is coming out
It\'s true
I tried using htmlspecialchars but I'm still getting the backslash.
Is there any way to write it so that the user sees
It's true
While the table in the database sees:
It\'s true
Below is my insert code:
global $wpdb;
$table = 'wp_nc_location';
$data = array(
'name' => $name,
'street_no' => $street_number,
'street_name' => $street_name,
'city' => $city,
'province_state' => $province_state,
'postal_code' => $postal,
'country' => $country
);
$format = array(
'%s',
'%s',
'%s',
'%s',
'%s',
'%s'
);
$wpdb->insert( $table, $data, $format);