SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    blahblahblah
    Posts
    1,447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    syntax error: T_ENCAPSED_STRING

    Hi,

    The below code produces an error. I am just testing some stuff, please don't try to find sense in it.

    The error is triggered in arg2, on the line where you can find data3

    I can't seem to find what is wrong...

    PHP Code:
    $obj

      
    ->arg1(array(
                                          
    'data1'         => 'id',
                                          
    'data2'         => 'path',
                                          
    'data3'         => $tableName,
                                          
    'data4'         => array(
                                                                        
    'foo' => 'var',
                                                                      ),
                                          
    'data5'         => array(
                                                                    
    'foo' => 'var'
                                                                   ),
                                        )
                                  )


            ->
    arg2(array(
                                                  
    'data1'             => 'id',
                                                  
    'data2'             => 'path',
                                                  
    'data3'             => array(
                                                                                  array(  
                                                                                         
    'table' => 'name',
                                                                                         
    'col'   => 'name',
                                                                                         
    'pk'    => 'pk',
                                                                                       ),

    //goes on...... 
    Thanks in advance for your help.

    Regards,

    -jj.

  2. #2
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    heaven
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how many arrays have you opened and how many have you closed? You opened a function have you closed it? It helps if you organize your code bit.

    PHP Code:
    ->arg2(array(
        
    'data1'             => 'id',
        
    'data2'             => 'path',
        
    'data3'             => array(
        array(
            
    'table' => 'name',
            
    'col'   => 'name',
            
    'pk'    => 'pk',
        ), 
    Creativity knows no other restraint than the
    confines of a small mind.
    - Me
    Geekly Humor
    Oh baby! Check out the design patterns on that framework!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •