note 128567 added to function.preg-replace
| From: | hkn06tr at gmail dot com | Date: | Tue, 23 May 2023 17:18:56 +0000 |
| Subject: | note 128567 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220522@lists.php.net to get a copy of this message | ||
$arr=["11aa11","22aa22",["33a33","44a44"]];
$arr=preg_replace("#a#","-",$arr);
// or $arr=str_replace("#a#","-",$arr);
var_dump($arr);
Hello if subjust contains array it cause to data loss.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 149.34.216.85)
----
Manual Page -- https://php.net/manual/en/function.preg-replace.php
Edit -- https://main.php.net/note/edit/128567
Del: integrated -- https://main.php.net/note/delete/128567/integrated
Del: useless -- https://main.php.net/note/delete/128567/useless
Del: bad code -- https://main.php.net/note/delete/128567/bad+code
Del: spam -- https://main.php.net/note/delete/128567/spam
Del: non-english -- https://main.php.net/note/delete/128567/non-english
Del: in docs -- https://main.php.net/note/delete/128567/in+docs
Del: other reasons-- https://main.php.net/note/delete/128567
Reject -- https://main.php.net/note/reject/128567
Search -- https://main.php.net/manage/user-notes.php