Re: What happens when i dont use the semicolon for closing my statement [message #177881 is a reply to message #177879] |
Wed, 25 April 2012 11:04 |
Captain Paralytic
Messages: 204 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Apr 25, 11:05 am, hakimse...@gmail.com wrote:
> On Wednesday, April 25, 2012 11:20:55 AM UTC+2, Erwin Moller wrote:
>> On 4/25/2012 10:43 AM, hakimse...@gmail.com wrote:
>>> I am new to php and i am trying to learn so i would appreciate if i can cleary understand how the php syntax work by knowing how to do it and what happens if i dont do something.
>
>>> In this case i would like to know what happens i i dont close my statement with a semicolon.
>
>> Why don't you try?
>
>> Test1:
>> <?php
>> $name = "hakim";
>> echo $name;
>> ?>
>
>> Test2:
>> <?php
>> $name = "hakim"
>> echo $name
>> ?>
>
>> And test them.
>
>> Also, make sure you have error reporting on when learning the language,
>> or developing.
>
>> Regards,
>> Erwin Moller
>
>> --
>> "That which can be asserted without evidence, can be dismissed without
>> evidence."
>> -- Christopher Hitchens
>
> Parse error: syntax error, unexpected '}', expecting ',' or ';' in C:\xampp\htdocs\hello.php on line 13
>
> how do i read this error and undcerstan what it means so next time in can be able to solve it so quickly.
It may be that programming just isn't for you. You left out a
semicolon and the message said "expecting ',' or ';'". You read this
error from left to right and you will see that it says that the
character that you left out is not there. I cannot see why you can't
understand this, but as I say, if you really can't see that then maybe
programming isn't for you.
|
|
|