Warning: You're looking at a styleless page because your browser is ignoring CSS styles. You're probably using a very old browser, or you disabled CSS support by purpose. We suggest you to download a modern browser such as Firefox or Internet Explorer.

Problem: In my PHP script, there's a string with a wrong highliting

PHPEdit handles documents with multiple languages in it: for example, a php file can contain parts of html, html can contain css, etc...

What can also regularly happens is that in your PHP script you create a SQL query in a PHP string, for example:

$sql = "select * from MyTable";

Since there's no obvious marked indicating that there's a language switch occuring (like the closing tag ?> for PHP to HTML, or the style tag for HTML to CSS), PHPEdit tries to guess if the string is a SQL query by analising it's first word. If it finds that the first word could start a SQL query, it switches the string to SQL, making the syntax highlighting different.

How to configure that?

Configuring if and how SQL strings are detected

In the settings dialog, "Languages" -> "PHP" -> "Code Tools", there's a "Check for inline SQL in PHP strings" block that allows you to disable this check completely, or restrict it to one letter case.

Configuring which words trigger the switch

Keywords triggering the switch to SQL are located in the file "Extensions\SQLLanguage\SQLStartKeywords.txt" in your installation directory. You can add, remove, edit keywords in this file to adjust the switch to suit your needs.

To make sure that your changes are kept over several reinstallations of PHPEdit, you need to save your edited copy of this file in your profile directory instead of PHPEdit's installation directory. Save it as "%APPDATA%\WaterProof\PHPEdit\<<version>>\ExtensionsData\SQLLanguage\SQLStartKeywords.txt".