echo not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The1corrupted
    New Member
    • Feb 2007
    • 134

    echo not working

    I know it's a syntax error but I can't quite pin it down and need help doing so.

    Parse error: parse error, unexpected ';' in C:\postchat.inc .php on line 140

    Well, here's the if statement line 140 is contained within.

    [php]
    if (strtolower($in fo['gender'])=="male") {
    $lookat="You looked at <b><i>".ucfirst ($info['cn'])."</i></b> and see that he is a <b><i>".strtolo wer($info['gender'])." ".strtolower($i nfo['race'])."</i></b>.
    He also appears to be a <b><i>".strtolo wer($info['cl'])."</i></b>.
    <b><i>".ucfirst ($info['cn'])."</i></b> seems to be <b><i>".strtolo wer($info['he'])."</i></b> in height, <b><i>".strtolo wer($info['we'])."</i></b> in weight, and his body seems <b><i>".strtolo wer($info['bu']."</i></b>.
    <b><i>".ucfirst ($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on his head, ".$mlear." ".$mrear." and ".$inv['shoulders']." on his shoulders.
    Extending from his shoulders, he has <b><i>".$inv['shoulders']."</i></b>. He also wears ".$inv['body']." on his body, ".$inv['waist']." around his waist, and ".$inv['legs']." on his legs.".
    //Line 140 is the next line
    ."
    <b><i>".ucfirst ($inv['user'])."</i></b> also has ".$inv['feet']." on his feet.";
    } elseif (strtolower($in fo['gender'])=="female") {
    $lookat="You looked at <b><i>".ucfirst ($info['cn'])."</i></b> and see that she is a <b><i>".strtolo wer($info['gender'])." ".strtolower($i nfo['race'])."</i></b>.
    She also appears to be a <b><i>".strtolo wer($info['cl'])."</i></b>.
    <b><i>".ucfirst ($info['cn'])."</i></b> seems to be <b><i>".strtolo wer($info['he'])."</i></b> in sheight, <b><i>".strtolo wer($info['we'])."</i></b> in weight, and her body seems <b><i>".strtolo wer($info['bu']."</i></b>.
    <b><i>".ucfirst ($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on her shead, ".$flear." ".$frear." and ".$inv['shoulders']." on her shoulders.
    Extending from her shoulders, she has <b><i>".$inv['shoulders']."</i></b>. she also wears ".$inv['body']." on her body, ".$inv['waist']." around her waist, and ".$inv['legs']." on her legs.
    <b><i>".ucfirst ($inv['user'])."</i></b> also has ".$inv['feet']." on her feet.";
    }[/php]
    Any insights?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    The error is here in the 4th line:
    [php]strtolower($inf o['bu'][/php]
    missing closing parenthesis, so
    [php]strtolower($inf o['bu'])[/php]
    But then you run into other problems, so the complete assignment statement should be like
    [php]$lookat= "You looked at <b><i>".ucfirst ($info['cn'])."</i></b> and see that he is a <b><i>".strtolo wer($info['gender'])." ".strtolower($i nfo['race'])."</i></b>".
    "He also appears to be a <b><i>".strtolo wer($info['cl'])."</i></b>".
    "<b><i>".ucfirs t($info['cn'])."</i></b> seems to be <b><i>".strtolo wer($info['he'])."</i></b> in height, <b><i>".strtolo wer($info['we'])."</i></b> in weight, and his body seems <b><i>".strtolo wer($info['bu'])."</i></b>".
    "<b><i>".ucfirs t($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on his head, ".$mlear." ".$mrear." and ".$inv['shoulders']." on his shoulders".
    "Extending from his shoulders, he has <b><i>".$inv['shoulders']."</i></b>. He also wears ".$inv['body']." on his body, ".$inv['waist']." around his waist, and ".$inv['legs']." on his legs.".
    "<b><i>".ucfirs t($inv['user'])."</i></b> also has ".$inv['feet']." on his feet.";[/php]

    Ronald :cool:

    Comment

    • The1corrupted
      New Member
      • Feb 2007
      • 134

      #3
      Originally posted by ronverdonk
      The error is here in the 4th line:
      [php]strtolower($inf o['bu'][/php]
      missing closing parenthesis, so
      [php]strtolower($inf o['bu'])[/php]
      But then you run into other problems, so the complete assignment statement should be like
      [php]$lookat= "You looked at <b><i>".ucfirst ($info['cn'])."</i></b> and see that he is a <b><i>".strtolo wer($info['gender'])." ".strtolower($i nfo['race'])."</i></b>".
      "He also appears to be a <b><i>".strtolo wer($info['cl'])."</i></b>".
      "<b><i>".ucfirs t($info['cn'])."</i></b> seems to be <b><i>".strtolo wer($info['he'])."</i></b> in height, <b><i>".strtolo wer($info['we'])."</i></b> in weight, and his body seems <b><i>".strtolo wer($info['bu'])."</i></b>".
      "<b><i>".ucfirs t($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on his head, ".$mlear." ".$mrear." and ".$inv['shoulders']." on his shoulders".
      "Extending from his shoulders, he has <b><i>".$inv['shoulders']."</i></b>. He also wears ".$inv['body']." on his body, ".$inv['waist']." around his waist, and ".$inv['legs']." on his legs.".
      "<b><i>".ucfirs t($inv['user'])."</i></b> also has ".$inv['feet']." on his feet.";[/php]

      Ronald :cool:
      Soo.. you're saying I embed each break in the code?

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        No not really. But I got another parse error after I changed the first one, so I (hastily) changed it into the way I showed it.

        Ronald :cool:

        Comment

        • The1corrupted
          New Member
          • Feb 2007
          • 134

          #5
          Really? I thought web browsers only recognized one space so you could make all the white space you wanted....

          Comment

          Working...