Jump to content

[SOLVED] What is wrong with this code?


stephenlk

Recommended Posts

I'm just learning the basics of php, so I apologize if the error is obvious.

 

<?php
	function addition($val1, $val2) {
		$sum = $val1 + $val2;
		return $sum;
	}
	if (addition(5. 6) == 11) {
		echo "Yes";
	}
?>

 

I keep getting a syntax error and I'm clueless to as why. Much help would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/112962-solved-what-is-wrong-with-this-code/
Share on other sites

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.