2017-09-28 4 views
0

J'ai cordes comme ci-dessous après avoir fait json_encodeComment faire pour supprimer r et n de la chaîne json dans cakephp 3?

[{"pid":1,"name":"Patient1","mobile":"123456789","birthdate":"07/23/1991","address":"57, New Building,\r\nCollege Road,\r\nPune-3545001","created":"2017-09-25T08:14:10+00:00","modified":"2017-09-25T12:27:20+00:00"}] 

alors comment puis-je supprimer \ r \ n.

Répondre

0
str_replace('\r\n', '', $string); 
+0

Merci @Alex Stallen. C'est un travail pour moi. –

+0

pourriez-vous accepter la réponse? –

+0

Oui, désolé pour la fin –