This topic is locked
[SOLVED]

 trouble viewing a field with "&"

9/23/2017 10:24:25 AM
PHPRunner General questions
K
keithh0427 author

I can't figure out how to view a text field that has the ampersand "&" in it.
I have a field in my MySQL table that is formatted as "lastname, hisname & hername".
But when I see the list page it only shows "lastname, hisname". The data in the table is correct. When I view the results from the MySQL statement in PHPRunner, the results show correctly.
But the generated pages do not.
Is there a setting that I'm missing?

romaldus 9/23/2017

Because & is interpreted as malformed HTML entity. In your database, replace & with &amp

romaldus 9/23/2017

or... if you dont't want to change the value in database, use custom value in phprunner. In phprunner visual editor set your filed > view as > custom

Use the following code:



$str = str_ireplace("&", "&amp", $value);

$value = $str;