note 98193 deleted from function.str-replace by thiago

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: ljelinek at gmail dot com
Reason: 0

----

Well, ad to function of Wes Foster, the complicated function str_replace_assoc could be done much easily:

<?php
function strReplaceAssoc(array $replace, $subject) {
	return str_replace(array_keys($replace), array_values($replace), $subject);	
}
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.