I have another question... I am using the following code to add html tags to a text file I am including. Basically [a] becomes <b>a</b>, #a# becomes <u>a</u>, and so on...
$content = preg_replace("'\[(.*?[a-zA-Z1-9])\]'","<b>\$1</b>",$content);
$content = preg_replace("'#(.*?[a-zA-Z1-9])#'","<u>\$1</u>",$content);
$content = preg_replace("'%(.*?[a-zA-Z1-9])%'","<i>\$1</i>",$content);
The problem is that I cannot use combinations like [#a#] to get <b><u>a</u></b>.
How would I write this to allow combinations?
$content = preg_replace("'\[(.*?[a-zA-Z1-9])\]'","<b>\$1</b>",$content);
$content = preg_replace("'#(.*?[a-zA-Z1-9])#'","<u>\$1</u>",$content);
$content = preg_replace("'%(.*?[a-zA-Z1-9])%'","<i>\$1</i>",$content);
The problem is that I cannot use combinations like [#a#] to get <b><u>a</u></b>.
How would I write this to allow combinations?