| 
	
 | 
 Posted by Kees Boer on 06/08/05 01:06 
Hi, I had a question, which I'm sure is fairly simple, but for some reason,  
I can't seem to be able to find the answer on line. 
 
I'm trying to create webpages that are all very similar, just with some  
variable content. I can do it in Java script, but then Internet Explorer 6.0  
will block it for most side, so I tried to do it in PHP, but I'm getting  
errors. 
 
This is the code in JavaScript, which works: 
 
<html> 
<head> 
<title>Untitled Document</title> 
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
</head> 
<body bgcolor="#FFFFFF" text="#000000"> 
 
<script language="JavaScript"> 
var greeting = "Hello There!!!" 
 
document.write("I am saying " + greeting) 
 
</script> 
 
</body> 
</html> 
 
Now I'm trying to run it in PHP. 
 
This is what I came up with but it has errors: 
 
<html> 
<head> 
<title>Untitled Document</title> 
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
</head> 
<body bgcolor="#FFFFFF" text="#000000"> 
 
<script language="php"> 
var greeting = "Hello There!!!" 
 
document.write("I am saying " + greeting) 
 
echo greeting 
 
</script> 
 
 
</body> 
</html> 
 
I've been searching on line for some tutorial or something to teach me the  
syntax, but I can't seem to find it. What did I do wrong? 
 
Thank you! 
 
Kees
 
[Back to original message] 
 |