1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

unexpected T_ECHO, expecting ',' or ';' Error help

Discussion in 'PHP' started by slayer__, Oct 3, 2010.

  1. #1
    I'm takin error with my sites function page.
    Could somebody check and fix the error pls?

    Error:
    Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in D:\Hosting\5839943\html\site\wp-content\themes\theme\functions.php on line 44

    line:



    $category$category function get_image($postid = 0, $size = "full")
    Code (markup):
     
    Last edited: Oct 3, 2010
    slayer__, Oct 3, 2010 IP
  2. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #2
    change
    echo "143191220"echo $contentecho " [...]"strlen;


    to
    echo "143191220" . $contentecho . " [...]" . strlen;
     
    lowridertj, Oct 3, 2010 IP
  3. kids

    kids Active Member

    Messages:
    411
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    68
    #3
    Or change
    echo "143191220"echo $contentecho " [...]"strlen;
    to
    echo "143191220"; echo $contentecho. " [...]".strlen;

    But there a small thing I dont know what is "strlen", did you mean that is function strlen (count number of character in string function or length of string)
     
    kids, Oct 3, 2010 IP
  4. slayer__

    slayer__ Member

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    thanx it solved but i have a problem about line 44:

    $content=substr($content, 0, $espacio)$espacio=strpos($content, " ", $max_char);
     
    slayer__, Oct 3, 2010 IP
  5. gregishere

    gregishere Well-Known Member

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    Digital Goods:
    4
    #5
    add";" before $espacio

    $content=substr($content, 0, $espacio);
    $espacio=strpos($content, " ", $max_char);
     
    gregishere, Oct 3, 2010 IP
  6. slayer__

    slayer__ Member

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #6
    thanx solved.
     
    Last edited: Oct 3, 2010
    slayer__, Oct 3, 2010 IP