Can someone tell me what I'm doing wrong
My code is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript" src="js/myfunctions.js"></script>
</head>
<body>
<?php
$x = 'tESts Are FUN';
$y = strtofirstupper($x);
$z = strtotitle($x);
?>
<p><?=$x;?></p>
<p><?=$y;?></p>
<p><?=$z;?></p>
</body>
</html>
The myfunctions.js file is found in the js directory which is one directory below the above file.
I keep getting the following error. I've tried putting the JS file in the same directory as the PHP file but to no avail.
Fatal error: Call to undefined function: strtofirstupper() in /home/intern/public_html/dev/test.php on line 11
The functions do work when pasted direclty into the header.