note 126331 added to function.str-replace

From: Date: Wed, 11 Aug 2021 13:12:58 +0000
Subject: note 126331 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-216774@lists.php.net to get a copy of this message
<?php function str_replace_json($search, $replace, $subject) { return json_decode(str_replace($search, $replace, json_encode($subject))); } ?> $string = 'common\\users'; print str_replace_json('\\', '/', $string) . '<br/>'; // common//users ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 80.90.224.94) ---- Manual Page -- https://php.net/manual/en/function.str-replace.php Edit -- https://main.php.net/note/edit/126331 Del: integrated -- https://main.php.net/note/delete/126331/integrated Del: useless -- https://main.php.net/note/delete/126331/useless Del: bad code -- https://main.php.net/note/delete/126331/bad+code Del: spam -- https://main.php.net/note/delete/126331/spam Del: non-english -- https://main.php.net/note/delete/126331/non-english Del: in docs -- https://main.php.net/note/delete/126331/in+docs Del: other reasons-- https://main.php.net/note/delete/126331 Reject -- https://main.php.net/note/reject/126331 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#216774) next »