Bu erişmeye çalıştığınız dizinin hangi parçası bağlıdır.
If you are trying to access a specific item, you can access it by its index ; for instance :
echo $info['passwordID'];
Size vermelidir:
myPassword
(edit after the comment)
E-posta adresi için, var_dump
'ın çıkışı bu kısım var:
["emailAddress"]=>
string(24) "myEmail@domain.com"
Bu e-posta adresi anahtarı "emailAddress
" olan bir unsur olarak dizide saklanan olduğunu gösterir.
Hangi böyle e-posta adresi almak gerekir anlamına gelir:
echo $info['emailAddress'];
And as you also have this portion of text in the var_dump
's output :
(About that duplication of data, you should read Pekka's answer, who provides an idea of why your data is in your array twice, with both integers and strings as keys)
[3]=>
string(24) "myEmail@domain.com"
Ayrıca kullanabilirsiniz:
echo $info[3];
(of course, in each of those cases, you could also store this to a variable for futures re-use)
Another solution, if you want to access each item, would be to use some foreach
loop ; for instance :
foreach ($info as $key => value) {
echo "Value for key $key is $value <br />";
}
You might want to go through the arrays section of the PHP manual, for more informations.
Ve, aynı zamanda, ilgili bölüm array functions.