I'm getting PHP Error and need some advice?

Scott

New member
I'm trying to run a script and getting the following error:

Parse error: syntax error, unexpected T_STRING in /home/scottpar/public_html/spgraphic/jackie1/rss.php on line 21

This is line 21;

$title = iconv(“UTF-8?, “ISO-8859-1?, $title);

This is the script;





<?php
function load_xml_feed($location)
{
global $value1;
$feedXml = simplexml_load_file($location);

$i= ‘1?;
foreach ($feedXml->channel->item as $article)
{
$title[$i] = (string)$article->title;
$link[$i] = (string)$article->link;
$description[$i] = (string)$article->description;

$i++;

}
$randnumber = rand(2, $i);
$link = trim($link[$randnumber]);
$title = trim($title[$randnumber]);
$description = trim($description[$randnumber]);
$title = iconv(“UTF-8?, “ISO-8859-1?, $title);
$description = iconv(“UTF-8?, “ISO-8859-1?, $description);
$value1 = array($title,$link,$description);
return $value1;
}

$rss = ‘http://feeds.feedburner.com/BlackHatSeoDigest’;
load_xml_feed($rss);
$link = $value1[1];
$title = $value1[0];
$description = $value1[2];

echo $link;
echo $title;
echo $description;
?>
Tried changing to “UTF-9? and still doesn't work
 
Back
Top