Need help with an error

Discussion in 'PHP' started by hope2life, Dec 18, 2011.

  1. #1
    Hi,

    this below code gives this error

    Parse error: syntax error, unexpected T_VARIABLE in /home/mastbusi/public_html/pivot.php on line 33

    can anyone help identify the problem in the ode?




    <?php

    $submit=$_POST['submit'];
    $high=$_POST['high'];
    $low=$_POST['low'];
    $close=$_POST['close'];

    $total=$high+$low+$close;
    $pivot=$total/3;


    $s=2*$pivot;
    $sone=$s-$high;
    $ss=$high-$low;
    $rone=$s–$low;




    if(isset($submit)){


    ?>

    Pivot:
    <?php

    echo $pivot."<br>";
    echo $sone."<br>";
    echo $ss."<br>";
    echo $rone."<br>";


    }

    else{ echo "Do not call a script directly";}


    ?>
     
    hope2life, Dec 18, 2011 IP
  2. Rising_Star

    Rising_Star Active Member

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #2
    $rone=$s–$low;

    the minus symbol used is other than the actual minus symbol... just edit it...
     
    Rising_Star, Dec 18, 2011 IP
  3. hope2life

    hope2life Active Member

    Messages:
    1,641
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Thanks for your great help
    Awesome coders here on DP
     
    hope2life, Dec 18, 2011 IP