Hello guys, I encountered a syntax error, and cannot figure out the
reason, for example:
============================== CODE ==============================
1:<?php
2:$opts = array ('header'=>'str1'.'str2');
3:?>
===============================
Works fine, but when I try to put it into a class, say:
============================== CODE ==============================
1:<?php
2:class Test
3:{
4: var $opts = array ('header'=>'str1'.'str2');
5:}
6:?>
============================== OUTPUT ==============================
Parse error: syntax error, unexpected '.', expecting ')' in C:\Documents
and Settings\Administrator\Local Settings\Temp\VI42E5.tmp on line 4
PHP Parse error: syntax error, unexpected '.', expecting ')' in
C:\Documents and Settings\Administrator\Local Settings\Temp\VI42E5.tmp on
line 4
====================================================================
I got the syntax error. Why?
My php version:
D:\>php -version
PHP 5.3.1 (cli) (built: Nov 19 2009 10:17:43)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
I'm currently not on this list, please Cc your comment to me.
Thanks in advance.
--
Dasn
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php