I have a Symfony 1.4 and Doctrine 1.2 project running and have a problem with output escaping in one of my DB calls.
The thing is, I am not retrieving a PHP object in my Doctrine query, but rather an array in PHP. The reason why I am doing this is another topic altogether, let's just say getting a PHP object would not be the solution. Essentially the query is an inner join between two doctrine models. Model 1 inner joins with Model 2 and the results yielded can be accessed like this:
foreach($results as $result)
{
echo $result['field1']; // accessing results for model 1
echo $result['model2']['field1']; // accessing results for model 2 (this inner joins with the model)
}
Now for the above, more specifically for model2, field1 consists of HTML markup, which is naturally output escaped. I need the HTML markup to be rendered as it is! Which is where the problem lies,
if this was a regulation Doctrine object, a simple $modelObject->getRawValue()->getField(); would render HTML markup without escaping it. I am not sure how HTML markup can be rendered in a PHP array?
Thanks