php中的意外'='[关闭]

I am getting a strange error in my php code, and I can't figure out why!
The error: Parse error: syntax error, unexpected '=' on line 9

<?php
session_start();

$name = $_POST['Contact-Name'];
$address = $_POST['Contact-address'];
$email = $_POST['Contact-Email'];
$phone = $_POST['Contact-Phone'];
$program = $_POST['Program-Name'];
$date-requested = $_POST['date-requested'];

$timestart = $_POST['program-start-time'];
$timeend = $_POST['program-end-time'];

$timestart-format = $_POST['starttime-format'];
$timeend-format = $_POST['endtime-format'];

$full-start-time = $timestart." ".$timestart-format;
$full-end-time = $timeend." ".$timeend-format;


//the book king hours
$mon-thurs-hours = array("10:00 AM", "11:00 AM", "12:00 PM", "1:00 PM", "2:00 PM", "3:00 PM", "4:00 PM", "5:00 PM", "6:00 PM");
$friday-hours = array("10:00 AM", "11:00 AM", "12:00 PM", "1:00 PM", "2:00 PM", "3:00 PM", "4:00 PM", "5:00 PM", "6:00 PM", "7:00 PM", "8:00 PM");
$saturday-hours = array("10:00 AM", "11:00 AM", "12:00 PM", "1:00 PM", "2:00 PM", "3:00 PM", "4:00 PM", "5:00 PM", "6:00 PM");

//find the day of the week and save to $dayofweek
$date = new DateTime();
$timestamp = date_timestamp_get($date-requested);
$dayofweek = date( "w", $timestamp);

//if sunday
if($dayofweek == 0){
echo "You choose Sunday!";
die('Sorry, the book king is closed on Sundays!');
}

//if monday, tues, wed, thurs
if(($dayofweek == 1)||($dayofweek == 2)||($dayofweek == 3)||($dayofweek == 4)){
echo "You choose day ".$dayofweek."!";
//see if bk is open at the specified times
if (in_array($full-start-time, $mon-thurs-hours)) {
  echo "Start time is okay!";
    }
    if (in_array($full-end-time, $mon-thurs-hours)) {
      echo "End time is okay!";
    }
}

//if friday
if($dayofweek == 5){
    echo "You choose day ".$dayofweek."!";
//see if bk is open at the specified times
if (in_array($full-start-time, $friday-hours)) {
  echo "Start time is okay!";
}
    if (in_array($full-end-time, $friday-hours)) {
      echo "End time is okay!";
    }
}

//if saturday
if($dayofweek == 6){
echo "You choose day ".$dayofweek."!";
    //see if bk is open at the specified times
    if (in_array($full-start-time, $saturday-hours)) {
      echo "Start time is okay!";
    }
    if (in_array($full-end-time, $saturday-hours)) {
      echo "End time is okay!";
    }
}

?>

I'm not sure if you need all that code, or just the first 9 lines, but I posted it all just in case!

I really appreciate your help with this!

The problem is in $date-requested identifier. You can not use - in identifier. Identifier may contain only letters, digits, and underscope (_) and must start with letter or underscope.

So it is interpreted as expression (variable $date minus constant requested), and the whole line as an assigment to that expression, which make no sense to PHP processor. That's why you get such strange error message.

Use valid variable name like $date_requested

$date-requested is not a valid variable name (cannot include a hyphen), use $date_requested or similar instead.