Syntax and parse errors in php

Closed
Phumla - Oct 12, 2015 at 06:35 AM
 Blocked Profile - Oct 12, 2015 at 05:26 PM
Hello, I'm working on a php project and experiences problems. I coded everything but cannot produce outputs. For every page I get ana error, either syntax or parse errors that I cannot resolve. eg.
Parse error: syntax error, unexpected '<' in /home/vhosts/48356786-phumlankomo.orgfree.com/task12.php on line 2

The code from line 1 to 7
<?php
<p>strlen</p>
$id_number = '9303130100085';
$length = strlen($id_number);
<p>strlen returns the length of the string.\n
output- 13
</p>
In this case I was supposed to chose string methods and give an example how they work, give an output.

In other cases, I created a form and the error is that to be on this line..
<form action= "task9.php" method="post"?>
How do I solve these?

1 response

Blocked Profile
Oct 12, 2015 at 05:26 PM
You never close your script with the "?>"

Try that!
0