Calling Xfields as meta description
Posted: Thu Feb 07, 2008 8:05 am
Hello.
Xfield name is: keyword
I do this
and
And it´s doing nothing what else to change
Thanks a lot
Xfield name is: keyword
I do this
Code: Select all
<?php
function show_keyword($keyword_id){
$file = file('cutenews/data/xfieldsdata.txt');
foreach($file as $xfield){
$xfield_arr = explode('|', $xfield);
if($xfield_arr[0] == $xfield_id){
return $xfield_arr[3];
}
}
}
?>Code: Select all
<meta name="description" content="<?=show_keyword($_GET['keyword']); ?> ">Thanks a lot