PHP echo problem with #'s

Discussion in 'OT Technology' started by ancientpc, Apr 15, 2003.

  1. ancientpc

    ancientpc Guest

    PHP:
    <?php

        $event
    []=array(4,26,'#4321');
        
        echo 
    $event[0][3];
        
        
    $event[]='#1234';
        
        echo 
    $event[1];
    ?>
    Can anybody explain why the second echo works but not the first?
     
  2. CruD

    CruD Bah, I'll just hack it

    Joined:
    Oct 25, 2001
    Messages:
    2,796
    Likes Received:
    0
    Location:
    Lakeway, TX
    Yes. It should be

    PHP:
     <?php 

        $event
    []=array(4,26,'#4321'); 
         
        echo 
    $event[0][2]; 
         
        
    $event[]='#1234'
         
        echo 
    $event[1]; 
    ?>
    [0][3] doesn't exist.
     
  3. ancientpc

    ancientpc Guest

    God I'm a fucking idiot.
     
  4. CruD

    CruD Bah, I'll just hack it

    Joined:
    Oct 25, 2001
    Messages:
    2,796
    Likes Received:
    0
    Location:
    Lakeway, TX
    No. Your human. Simple mistakes are always overlooked.
     

Share This Page