You are here: Re: stange behavior of $_SESSION « PHP Language « IT news, forums, messages
Re: stange behavior of $_SESSION

Posted by Peter Pei on 01/07/08 10:20

This explanation is not good enough.

PHP arrays are mixtures of indexed and associative? Two things:
1) There is no way to define/declare an array as associative or indexed, as
far as I know.
2) Something like this works:
<?php
$a["a"] = "a";
$a["b"] = "b";
$a[] = "c";
$a[] = "d";
var_dump($a);
?>
This gives you the following as expected:
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
[0]=>
string(1) "c"
[1]=>
string(1) "d"
}
Why should $_SESSION be different?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация