Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: userc865b
Added: Jan 11, 2019 7:55 AM
Views: 16
Tags: php
escapes quoutes in strung if there is a quote in string if it is already escped in string it will escape it one more time!
  1. addslashes(string)
  2.  
  3. // alternatively
  4.  
  5. $this->$field=str_replace("\"","\\\"",$this->$field);