Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_escape_before_single_quote($str){
- //$str = "Sha'ash'wato";
- $str_len = strlen($str);
- $str_temp = "";
- for($c = 0; $c < $str_len; $c++){
- if($str[$c] == "'"){
- $str_temp .= "\'";
- }else{
- $str_temp = $str_temp.$str[$c];
- }
- }
- // echo $str_temp;
- return $str_temp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement