06-12-2006
# have a look at
set -A testarray
#
testarray[1]="one"
testarray[2]="two"
testarray[3]="three"
three=3
#
print ${testarray[1]}
print ${testarray[2]}
print ${testarray[3]}
print ${testarray[three]}
gP
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi all. I just only wanna show all files from a whole 'root-table'....to understand:
"ls *.exe" ...for instance in the directory it only shows the files from the folder, but not form the subfolders !? how to solve this problem ? if you are on your home /root/users/.... I want to see all files... (10 Replies)
Discussion started by: svennie
10 Replies
2. UNIX for Dummies Questions & Answers
Hii everybody here
first of all i'm soo soo happy to join Unix people ...
I was using computer from age 7 till now i'm 20 :D
but in the past 2 years i used linux ( Ubuntu )
and i have a small Q !
while the linux is open source so how could I make changes to the application ! ... (4 Replies)
Discussion started by: Ali87
4 Replies
3. UNIX for Advanced & Expert Users
Dear All
I have an important request:
I have a pattern which look like this:
2 20080219_21:43:22.194 ISC-Libya Belgium1 24 IAM 20115139248 218913265641 b 11672 ACM b 20614 CPG b 20619 CPG b 20626 CPG f 33925 REL b 34215 RLC :COMMA: NCI=00,FCI=6001,CPC=0A,TMR=00,USI: :COMMB: BCI=0201:... (15 Replies)
Discussion started by: zanetti321
15 Replies
4. AIX
Hi ,
I Want to apply AIX lint to my source code which all are *.cpp/*.h
>lint test.cpp
lint: 1286-332 File test.cpp must have a .c, .C or .ln extension. It is ignored.
lint: 1286-334 There are no files to process.
I am getting above error.
-Ashok (3 Replies)
Discussion started by: ashokd001
3 Replies
5. What is on Your Mind?
I'm currently designing a degree plan that I hope will involved something with IT. I already have an two year degree that covers the basics of networking but I think that it would help to know some type of programming. I'm thinking of learning database programming but I'm not sure that's a... (6 Replies)
Discussion started by: Anna Hussie
6 Replies
6. Solaris
I have the processes (100+) by the oracle id and I'd to get the summarized view of the oracle processes' usage of the memory and the cpu.
top would give me some, but not all.
Thanks (3 Replies)
Discussion started by: iwmi
3 Replies
7. Red Hat
Is there any kernel tune parameters available to limit RAM usages at certain level .
EG .
RAM: 4 GB
Swap: 2 GB
I Need if my RAM usages reached 3 GB Kernel will start swaping new pages . ..
--Shirish Shukla (8 Replies)
Discussion started by: Shirishlnx
8 Replies
8. Shell Programming and Scripting
Hi,
How to do Perl script for floating license usages metric. Anyone help me out this issue?
Regards,
Ram. (0 Replies)
Discussion started by: ramanthan
0 Replies
PRINT(3) 1 PRINT(3)
print - Output a string
SYNOPSIS
int print (string $arg)
DESCRIPTION
Outputs $arg.
print is not actually a real function (it is a language construct) so you are not required to use parentheses with its argument list.
PARAMETERS
o $arg
- The input data.
RETURN VALUES
Returns 1, always.
EXAMPLES
Example #1
print examples
<?php
print("Hello World");
print "print() also works without parentheses.";
print "This spans
multiple lines. The newlines will be
output as well";
print "This spans
multiple lines. The newlines will be
output as well.";
print "escaping characters is done "Like this".";
// You can use variables inside a print statement
$foo = "foobar";
$bar = "barbaz";
print "foo is $foo"; // foo is foobar
// You can also use arrays
$bar = array("value" => "foo");
print "this is {$bar['value']} !"; // this is foo !
// Using single quotes will print the variable name, not the value
print 'foo is $foo'; // foo is $foo
// If you are not using any other characters, you can just print variables
print $foo; // foobar
print <<<END
This uses the "here document" syntax to output
multiple lines with $variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon no extra whitespace!
END;
?>
NOTES
Note
Because this is a language construct and not a function, it cannot be called using variable functions.
SEE ALSO
echo(3), printf(3), flush(3), Heredoc syntax.
PHP Documentation Group PRINT(3)