vendredi 19 septembre 2014

get_meta_tags() not working with meta tags that contain the "itemprop" attribute


Vote count:

0




simple problem.


I have a site that uses meta tags. I want to extract the meta tags with PHP. However, when using "itemprop" in addition to "name" get_meta_tags() doesn't work.




<meta name="description" itemprop="description" content="Example content" />


Output of get_meta_tags()


false




<meta name="description" content="Example content" />


Output of get_meta_tags()


array (size=1) 'description' => string 'Example content' (length=157)


Do you have any idea why the itemprop addition makes such problems and if there's a method that can replace the get_meta_tags() or do I have to use sth. like phpQuery (since it's not recommended to use regex for html code)



asked 38 secs ago







get_meta_tags() not working with meta tags that contain the "itemprop" attribute

Aucun commentaire:

Enregistrer un commentaire