Jump to content
Stef's Coding Community

Recommended Posts

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4loose.dtd">

 

<html>

<head>

 

<meta http-equiv="Content-Type" Content="text/html; charset=iso-8859-1">

 

<title></Title>

 

 

 

<?php

 

 

 

 

 

 

 

function footer($email, $arg = "Jimmy!") {

 

echo "$email<br><br>";

 

 

if($arg == "Jimmy!") {

 

return "hey, I know " .$arg;

 

} else {

 

return "Do I Know You" .$arg ."?";

 

 

 

}

 

?>

 

 

</head>

 

<body>

 

 

<?php

 

 

 

echo footer("er" );

 

 

 

?>

 

 

 

 

</body>

</html>

 

 

 

2mims 15 secs

 

 

 

on following this lesson

 

 

i get the following when trying to view in browser

 

 

have gone through the code and can not see any errors

 

 

browser error

 

 

Parse error: syntax error, unexpected $end in C:\wamp\www\functions_custom_three.php on line 56

 

 

advise please

Link to post
Share on other sites

as i'm still very new to php, I only started learning yesterday, feel free to ignore anything i say.

 

but as i have a little bit of knowledge with coding, it would appear that you never closed your first function.

I didn't look very closely or very long but i would try that first.

  • Upvote 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...