Calling Xfields as meta description

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!

Moderator: General Moderators

Post Reply
dejvo01
Forum Newbie
Posts: 1
Joined: Thu Feb 07, 2008 8:02 am

Calling Xfields as meta description

Post by dejvo01 »

Hello.

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];
}
}
}
?>
and

Code: Select all

<meta name="description" content="<?=show_keyword($_GET['keyword']); ?> ">
And it´s doing nothing what else to change
Thanks a lot
Post Reply