- Impact
- 16
Hey Guys,
Yet another question from me... sorry :santa:
Okay so say you had a meta tag for example:
I have a snippet of code to retrieve an attribute from a specified tag:
But how would I find the content attribute for only the keywords tag? Since they both have the same tag name?
Yet another question from me... sorry :santa:
Okay so say you had a meta tag for example:
Code:
<meta name="keywords" content="fun humor">
<meta name="description" content="this is a super site">
Code:
function getAttribs($t, $a, $s)
{
preg_match_all("/(<".$t." .*?".$a.".*?=.*?\")(.*?)(\".*?>)/", $s, $m);
return $m[2];
}
$t is the tag, $a is the attribute, $s is the content/code, $m is the new variable
But how would I find the content attribute for only the keywords tag? Since they both have the same tag name?






