how to get value from CDATA with simplexmlelement in XML in php

it is a very simple thing. just get cast the value in string that's it see the example below:-

<Product_Model><![CDATA[WH4-P2649]]></Product_Model>
you must have all xml value in given below variale.

$productsxml = simplexml_load_string($productsxml);


now cast the tag like this . (string) $product->Product_Model;

you will surely get your disered result.

enjoy 😆😇

Popular posts from this blog

Cant use dump() function in twig files or how to enable debug in opencart twig or print_r alternate use dump() in opencart 3.0

maximum execution time error when importing sql data file since php.ini has been already set max execution time 3000

SEO Custom URL in Opencart