List Info

Thread: note 78421 added to language.references




note 78421 added to language.references
user name
2007-10-11 03:53:13
Well, I'm very pleased to share my knowledge on reference
and array.
What do you think the following code?

<?php

$array1 = array(1 => 'One', 2 =>
'Two_Will_Be_Changed', 3 => 'Three');
// $p = & $array1[2]; line 1
$array2 = $array1;
// $p = & $array1[2]; line 2
$array2[2] = 'Changed';
print_r($array1);
print_r($array2);

?>

The result of the code?
If uncomment line 1, the result of the code?
And if line2?

So, now you know what i'm saying, are you?
----
Server IP: 69.147.83.197
Probable Submitter: 58.33.91.116
----
Manual Page -- 
http://www.php.net/manual/en/language.references.php
Edit        -- https://master
.php.net/note/edit/78421
Del: integrated  -- h
ttps://master.php.net/note/delete/78421/integrated
Del: useless     -- http
s://master.php.net/note/delete/78421/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78421/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78421/spam
Del: non-english -- 
https://master.php.net/note/delete/78421/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78421/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78421
Reject      -- https://mast
er.php.net/note/reject/78421
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


note 78421 rejected from language.references by nlopess
user name
2007-10-11 05:10:33
Note Submitter: yarco dot w at gmail dot com 

----

Well, I'm very pleased to share my knowledge on reference
and array.
What do you think the following code?

<?php

$array1 = array(1 => 'One', 2 =>
'Two_Will_Be_Changed', 3 => 'Three');
// $p = & $array1[2]; line 1
$array2 = $array1;
// $p = & $array1[2]; line 2
$array2[2] = 'Changed';
print_r($array1);
print_r($array2);

?>

The result of the code?
If uncomment line 1, the result of the code?
And if line2?

So, now you know what i'm saying, are you?

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )