PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The most important problem right now is that when meta keywords tag is present in the file together with the meta description tag, it gets confused and does not return correct result.
The other complication is that although both formats - i.e. <meta content="some words" name="description"> & '<meta name="description" content="some words">' work, each of them returns the correct results in different array which makes working with it somewhat complicated. Unless there is a better way how to work with these results.
I've simply imploded the array. Probably not the most elegant way but seems to be working. Now just the meta keywords & meta description part and everything will be perfect
Tomas
Last edited by tomfra on Sun Aug 01, 2004 4:48 pm, edited 1 time in total.
Anyone knows how to solve the problem when the <meta name="keywords"> and <meta name="content"> tags are both present in the html file? The second meta tag which is usually the content one does not work well the the preg_match_all REGEX above because it also tries to read the meta keywords tag which it should not - and it results in output like:
"some keywords" name="keywords">
...instead of the meta description content.
Any ideas are welcome. I promise I will not ask any more dumb questions for a while then