473,378 Members | 1,447 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,378 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 8326
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.