I want to replace from Facebook's relationships string "It's complicated" to other text.
The line is like this:
$user->relationship = str_replace(array('single', 'It's complicated'), array('Soltero(a)', 'Es complicado'),$data['relationship_status']);
Using: 'It's complicated' , 'It's complicated' or 'It's complicated'
,
do not work.
Any suggestions?
Thanks a lot.
Regards.
If you want to use literal single quoted character ('), you have to escape them.
like:
You could try this.
The PHP could not recognize the single literal quoted character (') without escape sequences character. Here is the explanation about it: Strings literal
It's also happen for double literal quoted character (").