Can someone tell me what this means?

Discussion in 'PHP' started by fredg61, Jun 17, 2008.

  1. #1
    I get this message when I click on the article page on my site:

    http://www.digitalcamera101.info/articles.php

    Parse error: syntax error, unexpected T_STRING in /home/besto18/public_html/digitalcamera101/articles.php on line 197

    Here are lines 192 thur 203:

    if (isset($rss_channel["ITEMS"])) {
    if (count($rss_channel["ITEMS"]) > 0) {
    for($i = 0;$i < count($rss_channel["ITEMS"]);$i++) {
    if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
    echo ("\n<div class="itemtitle"><a target=_blank href="" _wpro_href=""
    _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" . $rss_channel["ITEMS"][$i]["LINK"] . "">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>");
    } else { <--------------------------------------------------------Line 197echo ("\n<div class=/"itemtitle/">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>");
    }
    echo ("<div class=/"itemdescription"/>" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />"); }
    } else {
    echo ("No News Found");
    }
     
    fredg61, Jun 17, 2008 IP
  2. X.Homer.X

    X.Homer.X Peon

    Messages:
    290
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    if (isset($rss_channel["ITEMS"])) {
    if (count($rss_channel["ITEMS"]) > 0) {
    for($i = 0;$i < count($rss_channel["ITEMS"]);$i++) {
    if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
    echo ("\n<div class="itemtitle"><a target=_blank href="" _wpro_href=""
    _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" _wpro_href="" . $rss_channel["ITEMS"][$i]["LINK"] . "">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>");
    } else {
    echo ("\n<div class=[b]/"itemtitle/"[/b]>" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>");
    }
    echo ("<div class=[b]/"itemdescription"/[/b]>" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />"); }
    } else {
    echo ("No News Found");
    }
    
    Code (markup):
    those 2 lines seem to be using the wrong slashes instead of /" try \". For /"itemdescription"/ you are putting the " before the / so that wouldnt work anyway. so try replacing

    
    echo ("\n<div class=/"itemtitle/">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>");
    }
    echo ("<div class=/"itemdescription"/>" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />"); }
    
    PHP:
    with

    
    echo ("\n<div class=\"itemtitle\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>");
    }
    echo ("<div class=\"itemdescription\">" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />"); }
    
    PHP:
     
    X.Homer.X, Jun 17, 2008 IP
  3. fredg61

    fredg61 Well-Known Member

    Messages:
    160
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    Hi,

    Replaced it, still didn't work.:confused:
     
    fredg61, Jun 17, 2008 IP
  4. php-lover

    php-lover Active Member

    Messages:
    261
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Try this

    Line 197echo ("\n<div class=/"itemtitle/">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>");

    replace to this

    echo ("\n<div class=/"itemtitle/">{$rss_channel["ITEMS"][$i]["TITLE"]}</div>");
     
    php-lover, Jun 17, 2008 IP
  5. fredg61

    fredg61 Well-Known Member

    Messages:
    160
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #5
    Fixed!!!! But now I get this....

    Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/besto18/public_html/digitalcamera101/articles.php on line 256


    Line 256 is just </body>
     
    fredg61, Jun 18, 2008 IP