-4

full error: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\Source Code\displaysalesdetailed.php on line 48

Here is what I have there:

    $msgtocustomer = "You have sent purchase request for - $rsproduct[title]. To check the quality of the produce,
     you can contact $rsseller[
    seller_name] at $rsseller[mobile_no]. Farmer's Address: $rsseller[seller_address], $rs13city[city], 
$rs12state[state], $rs1country['country'].  ";
  • Which one is line 48 ? – LSE Jul 01 '21 at 08:15
  • You could try surrounding each of your array variables with `{` and `}`, this can remove confusion for the parser. Is there really a line break part-way through a variable name, or only when you post the code here? Why do you sometimes put single-quotes around the index name, and sometimes not? – droopsnoot Jul 01 '21 at 08:17

1 Answers1

-2

Use this

$msgtocustomer = "You have sent purchase request for - {$rsproduct['title']}. To check the quality of the produce,
     you can contact {$rsseller['
    seller_name']} at {$rsseller['mobile_no']}. Farmer's Address: {$rsseller['seller_address']}, {$rs13city['city']}, 
{$rs12state['state']}, {$rs1country['country']}.  ";
Alex Black
  • 450
  • 2
  • 7