jacen6678
03-25-2005, 11:58 AM
I need some help using preg_replace().
I have a string (ex: $my_string) that will contain a sub-string like (ex: '{my_substring}' ).
I want to replace all instances of {my_substring} with the value $my_array['my_substring']. I believe that this can be done using the /e modifier but I dont know how to write the reg-ex. Can someone tell me the preg_replace() function call?
I have a string (ex: $my_string) that will contain a sub-string like (ex: '{my_substring}' ).
I want to replace all instances of {my_substring} with the value $my_array['my_substring']. I believe that this can be done using the /e modifier but I dont know how to write the reg-ex. Can someone tell me the preg_replace() function call?