I thought I had this fixed till I did a page view and was wondering sshy some of my table attributes weren't set.
I have a Javascript that will prompt a user for five table attributes and will produce this in the message entry box:
[table bd = 15 bgc = green bdc = red cp =10 cs =10]
Which is passed through the following preg_replace code:
$txt = preg_replace( "#\[table bd=(.+?)bgc=(.+?)bdc=(.+?)cp=(.+?)cs=(.+?)\](.+?)\[/table\]#is", "<table
border=\\1bgcolor=\\2bordercolor=\\3cellpadding=\\4cellspacing=\\5>\\6</table>", $txt );
If you then preview or post the above this is what the code produced:
<table border = 5 bgc = blue bordercolor = black cp = 9 cs = 2>
What I want of course is:
<table border = 5 bgcolor = blue bordercolor = black cellpaddingp = 9 cellspacing = 2>
What is wrong with this code to produce this strange result?