PDA

View Full Version : DW Recordset use breaks regexp...


twoshedsmcginty
09-01-2005, 08:05 PM
I'm developing an online forum with DWMX2004/MySql/PHP where if you create a post, you can surround a word with right and left arrows so that that word becomes a hyperlink when the post is displayed.

I won't go into the rationale, or the regex script that does this; I know the script works, because when I create a variable that is hard-coded on the page, such as...

"In September 1847 Zeiss moved to a larger facility at >Wagnergasse< 32 and hired his first apprentice."

...then 'Wagnergasse' becomes a pertinent and functional hyperlink.

Trouble is, when I substitute the hard-coded variable content with EXACTLY THE SAME TEXT drawn from a MySql database via DreamWeaver's standard recordset feature, the regexp throws an error telling me that there are no instances of the right or left arrows. So presumably DW is 'helpfully' tryiing to interpret these out-of-place half-tags and they do not end up in the variable.

I'd rather use unique characters as my anchor-pair, rather than '>' and '<', but every possible keystroke seems to already have been appropriated by PHP or MySql.

Can anyone suggest a solution? Perhaps there is an entity-parser in PHP that I am not aware of, where the whole text of the MySql content can be loaded in to a variable without any cleaning or interpretation?

PS In this case I would prefer to use DW's standard recordset feature to save time, and to interoperate with other recordsets where this is not an issue, so the reply I am hoping for is one that will let me do this rather than just 'Don't use Dreamweaver'.