Jump to content

Escaping Brackets [ ]


chasethemetal

Recommended Posts

Hey all. I was wondering how one would escape brackets of this nature [ ]. I'm not sure if escaping is what I need to do either. Basically I have PHP echoing javascript. But whenever [ ] are involved it messes up all of the code coloring of BBedit / Dreamweaver etc.... This is isn't too serious, and the code still works. It just makes all of the color coding messed up. Right now I'm looping something that looks like this.... $a .= ['day', 5], this is something thats been bothering me for awhile. it's like a needle in my side. Thanks

Link to comment
Share on other sites

There's nothing there that should screw up the syntax highlighter, it sounds like the program you're using has a bug there. That highlights fine in Sublime Text and ConTEXT. The major issue with highlighting in ConTEXT is if you have a PHP file with an HTML block, and the HTML contains a single quote like an apostrophe. Sublime has a much more intelligent highlighter which doesn't get screwed up by that. In fact, Sublime will even correctly highlight a string of SQL code inside PHP as SQL.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...