Can someone tell me why the \n will not work in the program below when run in IE (html)? We are trying to figure out how to use escape characters when executing in html. When we try we often get:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in E:\Program Files\Apache Group\Apache2\htdocs\var1.php on line 11
Thanks for any guidance for us newbies
<?php
$price = 3.95;
$tax_rate = 0.08;
$tax_amount = $price * $tax_rate;
$total_cost = $price + $tax_amount;
$username = 'dan_weir';
$domain = '@nobles.edu';
$email_address = $username . $domain;
print 'The tax is ' . $tax_amount . '.';
print "\n"; // this prints a line break
print 'The total cost is ' . $total_cost;
print "\n"; // this prints a line break
print $email_address;
?>