FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to code () inside quotes
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to code () inside quotes [message #184259 is a reply to message #184251] Mon, 16 December 2013 21:02 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Denis McMahon wrote:

> On Mon, 16 Dec 2013 11:15:58 +0100, Arno Welzel wrote:
>> Am 15.12.2013 23:20, schrieb richard:
>>> array("this (are) only a test")
>>>
>>> what's the legal way of coding the (are)??
>>
>> array("this (are) only a test")
>>
>> Or what exactly is not "legal" there?
>
> It should be:
>
> $arr = array("This is only a test.");
>
> or for a sub-array:
>
> $arr = array( array( "This is only a test." ) );

A wild guess, as the original code is syntactically correct, assuming it is
followed by “;” (after optional whitespace). It is then parsed as follows:

array ( "this (are) only a test" ) ;
T_ARRAY ( T_CONSTANT_ENCAPSED_STRING ) ;


PointedEars
--
When all you know is jQuery, every problem looks $(olvable).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Xml Loading special Characters
Next Topic: URL linking to 3d array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 12:14:59 GMT 2024

Total time taken to generate the page: 0.04483 seconds