Answer the question
In order to leave comments, you need to log in
How to get value from XML without CDATA?
Good afternoon. There is xml (yml market) in which there is a description with html tags without using pointing to character data <![CDATA[
Example
<description>
<p>
текст
</p>
текст1
</description>
$offer->description
выдает только текст1
Answer the question
In order to leave comments, you need to log in
Well, it's obvious that you get a child tag "p" from the "description" tag, which means you need to extract it separately. With the rest of the HTML tags, the same trouble will come out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question