Hello,
I am populating a Dhtmlx form selection object from a SQL Server database using this PHP code:
$options = new SelectOptionsConnector($res,"SQLSrv");
$options->render_sql("SELECT code, title FROM proj_title","","code,title");
The result is a display, through the dhtmlxError.catchError function, of what appears to be poorly-formed XML.
Investigating further, I discovered that I could populate the selection object if I loaded no more than the first 33 rows in the database table:
$options->render_sql("SELECT TOP 33 code, title FROM proj_title","","code,title");
Viewing row 34 in the table, I discovered the value of the ‘title’ column is:
PE TRAIL SEGMENTS 3B & 4
I am fairly certain the ampersand ‘&’ is causing the emitted XML to ‘break’ and become invalid.
Two questions for you, please:
-
Is the ampersand indeed causing the XML to become invalid?
-
If so, how does one get around this problem?
Thank you very much for your help.