-1

I juste want to know how to read and print the value "client_unique_identifier" in this PHP array: this is the library link: http://ts3admin.info In particular this function: http://ts3admin.info/manual/classts3admin.html#aa73eb538596ef6bd5760a5601a819a69 the output from a library to ts3.

 Array { [cid] => 2 [client_idle_time] => 4445369 [client_unique_identifier] => nUixbsq/XakrrmbqU8O30R/D8Gc= [client_nickname] => par0noid [client_version] => 3.0.9.2 [Build: 1351504843] [client_platform] => Windows [client_input_muted] => 1 [client_output_muted] => 1 [client_outputonly_muted] => 0 [client_input_hardware] => 1 [client_output_hardware] => 1 [client_default_channel] => [client_meta_data] => [client_is_recording] => 0 [client_version_sign] => ldWL49uDKC3N9uxdgWRMTOzUabc1nBqUiOa+Nal5HvdxJiN4fsTnmmPo5tvglN7WqoVoFfuuKuYq1LzodtEtCg== [client_security_hash] => [client_login_name] => [client_database_id] => 2 [client_channel_group_id] => 5 [client_servergroups] => 6 [client_created] => 1361027850 [client_lastconnected] => 1361027850 [client_totalconnections] => 1 [client_away] => 0 [client_away_message] => [client_type] => 0 [client_flag_avatar] => [client_talk_power] => 75 [client_talk_request] => 0 [client_talk_request_msg] => [client_description] => [client_is_talker] => 0 [client_month_bytes_uploaded] => 0 [client_month_bytes_downloaded] => 0 [client_total_bytes_uploaded] => 0 [client_total_bytes_downloaded] => 0 [client_is_priority_speaker] => 0 [client_nickname_phonetic] => [client_needed_serverquery_view_power] => 75 [client_default_token] => [client_icon_id] => 0 [client_is_channel_commander] => 0 [client_country] => [client_channel_group_inherited_channel_id] => 2 [client_badges] => Overwolf=0 [client_base64HashClientUID] => jneilbgomklpfnkjclkoggokfdmdlhnbbpmdpagh [connection_filetransfer_bandwidth_sent] => 0 [connection_filetransfer_bandwidth_received] => 0 [connection_packets_sent_total] => 12130 [connection_bytes_sent_total] => 542353 [connection_packets_received_total] => 12681 [connection_bytes_received_total] => 592935 [connection_bandwidth_sent_last_second_total] => 82 [connection_bandwidth_sent_last_minute_total] => 92 [connection_bandwidth_received_last_second_total] => 84 [connection_bandwidth_received_last_minute_total] => 88 [connection_connected_time] => 5908749 [connection_client_ip] => 127.0.0.1 } 

thanks in advance Fede

3
  • 1
    echo $arr["client_unique_identifier"] Commented Sep 7, 2017 at 12:40
  • 1
    echo $array['client_unique_identifier'] ? Commented Sep 7, 2017 at 12:41
  • Read the PHP documentation page about arrays and insist on how to access array elements using the square brackets syntax. Commented Sep 7, 2017 at 12:52

1 Answer 1

-1

You can use extract function and use array keys as a variable

Example:

$arr = [ 'key1' => 'test1', 'key2' => 'test2' ]; extract($arr); echo $key1; // it will print 'test1' 
Sign up to request clarification or add additional context in comments.

1 Comment

whats wrong in it...please specify so i can improve it..thanks :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.