note 79506 added to function.preg-replace

From: Date: Fri, 30 Nov 2007 20:20:22 +0000
Subject: note 79506 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-132698@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/79506 Del: integrated -- https://master.php.net/note/delete/79506/integrated Del: useless -- https://master.php.net/note/delete/79506/useless Del: bad code -- https://master.php.net/note/delete/79506/bad+code Del: spam -- https://master.php.net/note/delete/79506/spam Del: non-english -- https://master.php.net/note/delete/79506/non-english Del: in docs -- https://master.php.net/note/delete/79506/in+docs Del: other reasons-- https://master.php.net/note/delete/79506 Reject -- https://master.php.net/note/reject/79506 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132698) next »