Then This hits me in the face
***
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a6853085/public_html/Index.php on line 16
***
Basically this is what I'm trying to do:
tml>
<head>
<title>My first PHP site</title>
<body>
<?php
$variable = 'This is a variable';
$page = 1;
$array = array(
'first' => 'First Value',
'second' => 'Second Value',
'third' => 'Third Value', );
echo '<p>$array['first']</p>';
echo '<p>$array['second']</p>';
echo '<p>$array['third']</p>';
echo "<h1>$variable</h1>";
echo "<p>Welcome to my first PHP site! Page number $page</p>";
?>
</body>
</head>
</html>
***
Yes, the output makes no sense as such, but I was just testing variables and array's.
The exact problem I faced was when using the <p> </p> tags.
I had the arrays as:
$array = array(
'First Value',
'Second Value',
'Third Value', );
echo "<p>$array[0]</p>";
echo "<p>$array[1]</p>";
echo "<p>$array[2]</p>";
And then when i started using Associative Arrays (The code top of page), I started getting errors. I took the <p> tags out and it was fine, so I know they are the source of the problem.
If anyone could tell me what I am doing wrong, I would appreciate it very much.
Cheers.


