By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,722 Members | 1,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,722 IT Pros & Developers. It's quick & easy.

My PHP4 test quiz

P: n/a
First or second answer is not true, which? Thank you!

1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"

2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
unset($a[2]);
?>

Answer is: $a[2] is undefined and $a[3] is 'tree'

Sep 16 '08 #1
Share this Question
Share on Google+
12 Replies


P: n/a
..oO(Andrew G. Koptyaev)
>First or second answer is not true, which? Thank you!
Why don't you try it?

Micha
Sep 16 '08 #2

P: n/a
On 16 Sep, 14:56, Michael Fesser <neti...@gmx.dewrote:
.oO(Andrew G. Koptyaev)
First or second answer is not true, which? Thank you!

Why don't you try it?

Micha
You don't even need to try it. Just look at the spelling and it's
obvious.
Sep 16 '08 #3

P: n/a
I try, but result of test quiz say me: 50% true of two.

--
http://www.rebatesoft.com

"Michael Fesser" <ne*****@gmx.de???????/???????? ? ???????? ?????????:
news:jk********************************@4ax.com...
.oO(Andrew G. Koptyaev)
>>First or second answer is not true, which? Thank you!

Why don't you try it?

Micha

Sep 16 '08 #4

P: n/a
Andrew G. Koptyaev wrote:
I try, but result of test quiz say me: 50% true of two.
He means, try the code.

And please don't top post. Thanks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Sep 16 '08 #5

P: n/a
Andrew G. Koptyaev wrote:
First or second answer is not true, which? Thank you!

1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"

2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
unset($a[2]);
?>

Answer is: $a[2] is undefined and $a[3] is 'tree'
Is this supposed to be a quiz for the community here, or do you need help?

As for your question, both answers are correct.

--
Curtis
Sep 16 '08 #6

P: n/a
"Curtis" <dy****@gmail.com???????/???????? ? ???????? ?????????:
news:QaSzk.265$pp3.93@trnddc06...
Andrew G. Koptyaev wrote:
>First or second answer is not true, which? Thank you!

1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"

2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
unset($a[2]);
?>

Answer is: $a[2] is undefined and $a[3] is 'tree'

Is this supposed to be a quiz for the community here, or do you need help?
Need help. Quiz for me.
As for your question, both answers are correct.

Sep 16 '08 #7

P: n/a
On Sep 16, 6:38*pm, Curtis <dye...@gmail.comwrote:
Andrew G. Koptyaev wrote:
First or second answer is not true, which? Thank you!
1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"
2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
unset($a[2]);
?>
Answer is: $a[2] is undefined and $a[3] is 'tree'

Is this supposed to be a quiz for the community here, or do you need help?

As for your question, both answers are correct.
No they aren't
Sep 16 '08 #8

P: n/a
Captain Paralytic wrote:
On Sep 16, 6:38 pm, Curtis <dye...@gmail.comwrote:
>Andrew G. Koptyaev wrote:
>>First or second answer is not true, which? Thank you!
1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"
2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
unset($a[2]);
?>
Answer is: $a[2] is undefined and $a[3] is 'tree'
Is this supposed to be a quiz for the community here, or do you need help?

As for your question, both answers are correct.
No they aren't
Run the code, the output is as the answers describe. I just ran the
code, to be sure, and the first code fragment does output 1, and the
second results in an array as described by the 2nd answer.

--
Curtis
Sep 16 '08 #9

P: n/a
..oO(Curtis)
>Captain Paralytic wrote:
>On Sep 16, 6:38 pm, Curtis <dye...@gmail.comwrote:
>>Andrew G. Koptyaev wrote:
First or second answer is not true, which? Thank you!
1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"
2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
^^^^^
>>>unset($a[2]);
?>
Answer is: $a[2] is undefined and $a[3] is 'tree'
^^^^
>>Is this supposed to be a quiz for the community here, or do you need help?

As for your question, both answers are correct.
No they aren't

Run the code, the output is as the answers describe. I just ran the
code, to be sure, and the first code fragment does output 1, and the
second results in an array as described by the 2nd answer.
Not exactly. Look closer. ;)

Micha
Sep 16 '08 #10

P: n/a
On Sep 16, 7:30*pm, Curtis <dye...@gmail.comwrote:
Captain Paralytic wrote:
On Sep 16, 6:38 pm, Curtis <dye...@gmail.comwrote:
Andrew G. Koptyaev wrote:
First or second answer is not true, which? Thank you!
1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"
2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
unset($a[2]);
?>
Answer is: $a[2] is undefined and $a[3] is 'tree'
Is this supposed to be a quiz for the community here, or do you need help?
As for your question, both answers are correct.
No they aren't

Run the code, the output is as the answers describe. I just ran the
code, to be sure, and the first code fragment does output 1, and the
second results in an array as described by the 2nd answer.

--
Curtis
No it does not!
Sep 16 '08 #11

P: n/a
Michael Fesser wrote:
.oO(Curtis)
>Captain Paralytic wrote:
>>On Sep 16, 6:38 pm, Curtis <dye...@gmail.comwrote:
Andrew G. Koptyaev wrote:
First or second answer is not true, which? Thank you!
1)
<?
$a[1]=4;
$a[2]=5;
$a[3]=6;
echo key($a);
?>
Answer: output is "1"
2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
^^^^^
>>>>unset($a[2]);
?>
Answer is: $a[2] is undefined and $a[3] is 'tree'
^^^^
>>>Is this supposed to be a quiz for the community here, or do you need help?

As for your question, both answers are correct.
No they aren't
Run the code, the output is as the answers describe. I just ran the
code, to be sure, and the first code fragment does output 1, and the
second results in an array as described by the 2nd answer.

Not exactly. Look closer. ;)

Micha
Haha, back to reading comprehension with me.

--
Curtis
Sep 16 '08 #12

P: n/a
Curtis wrote:
2)
<?php
$a=array(1=>'one',2=>'two',3=>'three');
unset($a[2]);
?>

Answer is: $a[2] is undefined and $a[3] is 'tree'

Is this supposed to be a quiz for the community here, or do you need help?

As for your question, both answers are correct.
Um, no, they aren't. :-)
Sep 17 '08 #13

This discussion thread is closed

Replies have been disabled for this discussion.