1

I want to replace this using str_replace of PHP

'test

by

test

EDIT

Done by this :

$test = str_replace("'", "''", "'test");
lokiloq
  • 194
  • 2
  • 10

1 Answers1

7

Try Function STR_REPLACE

Syntax;

str_replace(find,replace,string,count)

EX:

$string = str_replace("'","''","'test");
lokiloq
  • 194
  • 2
  • 10
Gopal Joshi
  • 2,350
  • 22
  • 49