473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Jan 9 '06 #1
4 8329
lwoods wrote:
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


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.
Jan 9 '06 #2
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

Jan 9 '06 #3
Thanks, John....

Larry

<jo*********@sbcglobal.net> wrote in message
news:P2*******************@newssvr27.news.prodigy. net...
lwoods wrote:
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


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.

Jan 9 '06 #4
Thanks, Darkstar

Larry

"Darkstar 3D" <st********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
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

Jan 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: deko | last post by:
Do I need to use curly brackets in PHP if .. else statements? other constructs? Does it matter? What are Best Practices? Why? thanks in advance... This seems to work WITHOUT curly brackets:...
8
by: Ken in Melbourne Australia | last post by:
If I use the curly bracket syntax (referred to as the complex syntax) within a string, how do I get to call a function within it? The php manual says that the first (or previous) character for...
1
by: inquirydog | last post by:
Hello- I, the inquirydog have a question: Using the AVT mechanism (curly brackets in an attribute value) is a great way to decrease the size of your xml document and make it more readable. Can...
6
by: STF | last post by:
While reading the C++ tutorial in this page: http://www.cplusplus.com/doc/tutorial/tut2-2.html I'm astonished to learn that we could omit curly brackets in function declaration for single...
2
by: Zain Homer | last post by:
Someone please let me know if I'm sending this to the wrong email alias... I'm wondering why we can't use the glob module to glob with curly brackets like we can from the command line (at least...
6
by: DaTurk | last post by:
Hi, I'm a bit rusty with the wonderful language of c++. I worked with it, maybe 6 or 7 years ago and now I need to knock the dust off. But I was perusing some code when I noticed that this one...
3
by: Grande News | last post by:
Hi, I've got some PHP code that looks like this $cura= ord($data{$pnum*2}); $curb = ord($data{$pnum*2+1}); Notice the curly braces -- does using them make any difference, or will square...
18
by: dspfun | last post by:
Hi! The words "expression" and "statement" are often used in C99 and C- textbooks, however, I am not sure of the clear defintion of these words with respect to C. Can somebody provide a sharp...
13
by: JOYCE | last post by:
Please help me,I don't know where the error is.The following is my programming. #include<stdio.h> #define SIZE 99 void mean (const int answer); void median(int answer); void mode(int...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.