|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Question on Preg_replace()
currently on my site I have multiple preg_replace functions in use, ie.
[PHP] $var="Hello Welcome to my site\nIt squote s cool right"; $var=preg_replace("/\n\","<br>",$var); $var=preg_replace("/ squote /","'",$var); echo $var; [PHP] How could I combine them into one preg_replace function?
__________________
CHornJr "One day I'll know what I am doing" ![]() My Blog Suanhacky Lodge #49 Rebel Squadrons |
|
#2
|
|||
|
|||
|
use str_replace instead of costly preg_*
You certainly don't need preg_replace()
PHP Code:
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Question on Preg_replace() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|