-3

我希望能够从 PHP 中的这个数组中提取 [HostName] 的输出。谢谢!

Array
(
    [Protocol] => 17
    [HostName] => [HG] JAILBREAK #1 - HeLLsGamers.com | 30+ LR's | FastDL
    [Map] => ba_jail_hellsgamers_fx6
    [ModDir] => cstrike
    [ModDesc] => Counter-Strike: Source
    [AppID] => 240
    [Players] => 12
    [MaxPlayers] => 64
    [Bots] => 0
    [Dedicated] => d
    [Os] => l
    [Password] => 
    [Secure] => 1
    [Version] => 1.0.0.75
    [GamePort] => 27015
    [ServerID] => -682722125
    [GameTags] => HLstatsX:CE,alltalk,bunnyhopping,cool,drugs,free,gameme,gang,hellsgamers,hg,increased_maxplayers,jail,jailbr,nostats,startmoney
)
4

2 回答 2

1

像这样:

echo $Array[HostName]; // output: [HG] JAILBREAK #1 - HeLLsGamers.com | 30+ LR's | FastDL

$Array您在此处打印和复制的数组在哪里。

我建议你从php.net开始阅读- 因为这是你能做的最基本的事情。

于 2013-01-28T10:01:06.303 回答
1

那是最简单的问题…………就用这个

echo $Your_array[HostName];
于 2013-01-28T10:02:41.797 回答