Originally Posted by felgall
Neither of those worked because you didn't define $1 by wrapping the part of the regular expression you want to substitute inside of () like this:
preg_replace("/(name1|name2|name3|name4)/i", '<a href="/folder/$1/">$1</a> ',$temp_page)
Any way to get the URl $1 to be lowercase? I've tried sticking strtolower in there in various forms, but it just breaks the code. Is the $1 usage causing a problem doing anything else with it?