Where do I find definition of use of curly brackets?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lwoods

    Where do I find definition of use of curly brackets?

    In PHP you can do this:

    $x="test";
    $y=$x{2};
    echo $y;

    ....will display "s".

    Where in the PHP doc is this type of behavior for "curly brackets" defined?

    TIA,

    Larry Woods


  • john.d.mann@sbcglobal.net

    #2
    Re: Where do I find definition of use of curly brackets?

    lwoods wrote:[color=blue]
    > In PHP you can do this:
    >
    > $x="test";
    > $y=$x{2};
    > echo $y;
    >
    > ....will display "s".
    >
    > Where in the PHP doc is this type of behavior for "curly brackets" defined?
    >
    > TIA,
    >
    > Larry Woods
    >
    >[/color]

    Try:


    Search for: "Complex (curly) syntax", it's about 1/4 of the way into the
    page.

    Comment

    • Darkstar 3D

      #3
      Re: Where do I find definition of use of curly brackets?

      Look up array. You asked for the value of element 2. So

      T E S T
      0 1 2 3

      Not sure of where in the docs this is. They are searchable

      Comment

      • lwoods

        #4
        Re: Where do I find definition of use of curly brackets?

        Thanks, John....

        Larry

        <john.d.mann@sb cglobal.net> wrote in message
        news:P2mwf.7255 4$tV6.38121@new ssvr27.news.pro digy.net...[color=blue]
        > lwoods wrote:[color=green]
        >> In PHP you can do this:
        >>
        >> $x="test";
        >> $y=$x{2};
        >> echo $y;
        >>
        >> ....will display "s".
        >>
        >> Where in the PHP doc is this type of behavior for "curly brackets"
        >> defined?
        >>
        >> TIA,
        >>
        >> Larry Woods[/color]
        >
        > Try:
        > http://www.php.net/manual/en/language.types.string.php
        >
        > Search for: "Complex (curly) syntax", it's about 1/4 of the way into the
        > page.[/color]


        Comment

        • lwoods

          #5
          Re: Where do I find definition of use of curly brackets?

          Thanks, Darkstar

          Larry

          "Darkstar 3D" <stacyspear@gma il.com> wrote in message
          news:1136776899 .323708.47090@o 13g2000cwo.goog legroups.com...[color=blue]
          > Look up array. You asked for the value of element 2. So
          >
          > T E S T
          > 0 1 2 3
          >
          > Not sure of where in the docs this is. They are searchable
          >[/color]


          Comment

          Working...