Get Meta Tags

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 16, 2008   (RSS)

Re: [sagentic] Get Meta Tags

By Dave - October 16, 2008

Hi sagentic,

Try one of these ways:

$tags = get_meta_tags('http://' . $webpanelRecord['domain']);

$tags = get_meta_tags("http://{$webpanelRecord['domain']}");

$domainWithHttp = 'http://' . $webpanelRecord['domain'];
$tags = get_meta_tags($domainWithHttp);

PHP only replaces variables in double quoted strings. So:

$color = 'red';
echo 'I like $color'; # prints I like $color
echo "I like $color"; # prints I like red

But with an array (as $record variables are) you need to put it in double quotes and then put curly braces around the variable so it knows where it ends.

$record['color'] = 'red';
echo "I like {$record['color']}"; # prints I like red

Hope that helps! Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Get Meta Tags

By Kenny - October 16, 2008

Dave -

I spent hours trying to get that to work before I asked you. I can't come up with one, but you come up with three?

Life is unfair to some of us! They all worked. Thanks!!!

Kenny