note 79508 added to function.preg-replace

From: Date: Fri, 30 Nov 2007 20:22:07 +0000
Subject: note 79508 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-132700@lists.php.net to get a copy of this message
This code is much easier than preg_replaces current implementation, I stole some of this from someone else here, but to make it more explicit: $relation['/pattern/'] = "replacement"; $text_out = preg_replace(array_keys($relation), array_values($relation), $text_in); Fast, efficient, no guess work.. ---- Server IP: 69.147.83.197 Probable Submitter: 76.113.29.191 ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace.php Edit -- https://master.php.net/note/edit/79508 Del: integrated -- https://master.php.net/note/delete/79508/integrated Del: useless -- https://master.php.net/note/delete/79508/useless Del: bad code -- https://master.php.net/note/delete/79508/bad+code Del: spam -- https://master.php.net/note/delete/79508/spam Del: non-english -- https://master.php.net/note/delete/79508/non-english Del: in docs -- https://master.php.net/note/delete/79508/in+docs Del: other reasons-- https://master.php.net/note/delete/79508 Reject -- https://master.php.net/note/reject/79508 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132700) next »