Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure what you're talking about as the 'keywords' index in the array returned from get_meta_tags isn't case sensitive in the manner you're describing.</p> <p>As such, any keyword information that's been provided will be made available within this element.</p> <p>e.g. If you look at the source of Microsoft.com you'll see...</p> <pre><code>&lt;meta name="Keywords" content="Microsoft, product, support, help, training, Office, Windows, software, download, trial, preview, demo, business, security, update, free, computer, PC, server, search, download, install, news" scheme="" /&gt; </code></pre> <p>...and if you run...</p> <pre><code>&lt;?php $sourceURL = 'http://www.microsoft.com'; $metaData = get_meta_tags($sourceURL); var_dump($metaData); ?&gt; </code></pre> <p>... the 'keywords' element contains...</p> <blockquote> <p>["keywords"]=> string(192) "Microsoft, product, support, help, training, Office, Windows, software, download, trial, preview, demo, business, security, update, free, computer, PC, server, search, download, install, news"</p> </blockquote> <p>As such, get_meta_tags, etc. is doing the right thing and any keywords present in the page will always be available within the 'keywords' element.</p> <p><strong>UPDATE</strong></p> <p>If you're trying to get each of the keywords from within the meta keywords string into an array, you can use:</p> <pre><code>&lt;?php $sourceURL = 'http://www.microsoft.com'; $metaData = get_meta_tags($sourceURL); $keywords = explode(',', $metaData['keywords']); // Trim un-necessary leading/trailing spaces foreach($keywords as &amp;$keyword) { $keyword = strtolower(trim($keyword)); } var_dump($keywords); ?&gt; </code></pre> <p>Simply remove the <code>strtolower</code> call from the above if you don't want the keywords to be lower-cased.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload