Jump to content

[SOLVED] operator expresison issues


geekette

Recommended Posts

I wrote the following..:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>

<title>Arithmetic Examples</title>

</head>

<body>

<?php

 

$Number = 100;

$Result = 0;

 

$Result = $Number + 50;

echo '<p>$Result after addition = ', $Result, "<br />";

$Result = $Number / 4;

echo '$Result after division  = ', $Result, "<br />";

$Result = $Number - 25

echo '$Result after subtraction = ', $Result, "<br />";

$Result = $Number * 2;

echo '$Result after multiplication = ', $Result, "<br />";

 

$Result = ++$Number;

echo '$Result after increment = ', $Result, "</p>";

?>

 

</body>

</html>

 

and received the following in my browser..:

 

Parse error: syntax error, unexpected T_ECHO in /Applications/xampp/xamppfiles/htdocs/xampp/classfolder/ch3/arithmeticexamples.php on line 18

 

I also validated it using the WDG Validator, but received no errors, so I'm confused as to why this isn't rendering correctly..any help would be appreciated!

 

 

Edited for mispasting what my browser displayed.

Link to comment
https://forums.phpfreaks.com/topic/148006-solved-operator-expresison-issues/
Share on other sites

Opps, i pasted it incorrectly...this is what I received..:

 

Parse error: syntax error, unexpected T_ECHO in /Applications/xampp/xamppfiles/htdocs/xampp/classfolder/ch3/arithmeticexamples.php on line 18

 

 

 

Except, there appears to be nothing wrong that I can see with regards to line 18.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.