Note that there are some explanatory texts on larger screens.

plurals
  1. POInsert array values into a html table
    primarykey
    data
    text
    <p>I'm trying to insert certain values from an array which is the result of a query scan. The array looks like this: </p> <pre><code>Array ( [PERP] =&gt; Array ( [Lee_AttachViewModelToView] =&gt; 0 [Lee_WeaponAutoReload] =&gt; 0 [Lee_WeaponDamageMul] =&gt; 1 [Lee_WeaponEDC] =&gt; 3 [Lee_WeaponEDT] =&gt; 1 [Lee_WeaponHitEffect] =&gt; 0 [Lee_WeaponInfiniteAmmo] =&gt; 0 [Lee_WeaponRecoilMul] =&gt; 1.4 [Lee_WeaponShakeMul] =&gt; 5 [Lee_WeaponViewKick] =&gt; 1 [Lee_WeaponsSpeed] =&gt; 1 [ai_disabled] =&gt; 0 [ai_ignoreplayers] =&gt; 0 [coop] =&gt; 0 [deathmatch] =&gt; 1 [decalfrequency] =&gt; 10 [dedicated] =&gt; d [game_descr] =&gt; sandbox [game_dir] =&gt; garrysmod [gq_address] =&gt; 192.168.1.1 [gq_dedicated] =&gt; d [gq_gametype] =&gt; [gq_hostname] =&gt; Test server [gq_mapname] =&gt; gm_construct [gq_maxplayers] =&gt; 60 [gq_mod] =&gt; garrysmod [gq_numplayers] =&gt; 8 [gq_online] =&gt; 1 [gq_password] =&gt; 0 [gq_port] =&gt; 27016 [gq_protocol] =&gt; source [gq_transport] =&gt; udp [gq_type] =&gt; gmod [hostname] =&gt; Test server [map] =&gt; gm_construct [max_players] =&gt; 60 [mp_allowNPCs] =&gt; 1 [mp_autocrosshair] =&gt; 1 [mp_fadetoblack] =&gt; 0 [mp_falldamage] =&gt; 0 [mp_flashlight] =&gt; 1 [mp_footsteps] =&gt; 1 [mp_forcerespawn] =&gt; 1 [mp_fraglimit] =&gt; 0 [mp_friendlyfire] =&gt; 0 [mp_teamlist] =&gt; hgrunt;scientist [mp_teamplay] =&gt; 0 [mp_timelimit] =&gt; 0 [mp_weaponstay] =&gt; 0 [nextlevel] =&gt; [num_bots] =&gt; 0 [num_players] =&gt; 8 [num_rules] =&gt; 98 [os] =&gt; w [password] =&gt; 0 [physgun_limited] =&gt; 0 [players] =&gt; Array ( [0] =&gt; Array ( [id] =&gt; 0 [name] =&gt; Supreme Leader Aladeen [score] =&gt; 3 [time] =&gt; 17884.9082031 [gq_name] =&gt; Supreme Leader Aladeen [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 3 [gq_ping] =&gt; ) [1] =&gt; Array ( [id] =&gt; 0 [name] =&gt; [ZFrag] SpeedDemon [score] =&gt; 1 [time] =&gt; 7439.12109375 [gq_name] =&gt; [ZFrag] SpeedDemon [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 1 [gq_ping] =&gt; ) [2] =&gt; Array ( [id] =&gt; 0 [name] =&gt; [ZFrag] Swiper The Fox [score] =&gt; 0 [time] =&gt; 7159.75634766 [gq_name] =&gt; [ZFrag] Swiper The Fox [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 0 [gq_ping] =&gt; ) [3] =&gt; Array ( [id] =&gt; 0 [name] =&gt; {MG} attacker1983 [score] =&gt; 0 [time] =&gt; 3252.78735352 [gq_name] =&gt; {MG} attacker1983 [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 0 [gq_ping] =&gt; ) [4] =&gt; Array ( [id] =&gt; 0 [name] =&gt; rolisrolis7 [score] =&gt; 1 [time] =&gt; 3240.36376953 [gq_name] =&gt; rolisrolis7 [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 1 [gq_ping] =&gt; ) [5] =&gt; Array ( [id] =&gt; 0 [name] =&gt; T-Bone Jackson [score] =&gt; 0 [time] =&gt; 2755.24243164 [gq_name] =&gt; T-Bone Jackson [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 0 [gq_ping] =&gt; ) [6] =&gt; Array ( [id] =&gt; 0 [name] =&gt; Maxen #Unban Odx &lt;3 [score] =&gt; 0 [time] =&gt; 1802.96948242 [gq_name] =&gt; Maxen #Unban Odx &lt;3 [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 0 [gq_ping] =&gt; ) [7] =&gt; Array ( [id] =&gt; 0 [name] =&gt; the pro pingvin [score] =&gt; 0 [time] =&gt; 814.78704834 [gq_name] =&gt; the pro pingvin [gq_kills] =&gt; [gq_deaths] =&gt; [gq_score] =&gt; 0 [gq_ping] =&gt; ) ) [protocol] =&gt; 17 [r_AirboatViewDampenDamp] =&gt; 1.0 [r_AirboatViewDampenFreq] =&gt; 7.0 [r_AirboatViewZHeight] =&gt; 0.0 [r_JeepViewDampenDamp] =&gt; 1.0 [r_JeepViewDampenFreq] =&gt; 7.0 [r_JeepViewZHeight] =&gt; 10.0 [r_VehicleViewDampen] =&gt; 0 [sb_version] =&gt; 1.531 [sbox_bonemanip_misc] =&gt; 0 [sbox_bonemanip_npc] =&gt; 1 [sbox_bonemanip_player] =&gt; 0 [sbox_godmode] =&gt; 1 [sbox_maxballoons] =&gt; 100 [sbox_maxbuttons] =&gt; 50 [sbox_maxdynamite] =&gt; 10 [sbox_maxeffects] =&gt; 200 [sbox_maxemitters] =&gt; 20 [sbox_maxhoverballs] =&gt; 50 [sbox_maxlamps] =&gt; 3 [sbox_maxlights] =&gt; 5 [sbox_maxnpcs] =&gt; 10 [sbox_maxprops] =&gt; 200 [sbox_maxragdolls] =&gt; 10 [sbox_maxsents] =&gt; 300 [sbox_maxspawners] =&gt; 10 [sbox_maxthrusters] =&gt; 50 [sbox_maxturrets] =&gt; 4 [sbox_maxvehicles] =&gt; 3 [sbox_maxwheels] =&gt; 50 [sbox_noclip] =&gt; 1 [sbox_persist] =&gt; [sbox_playershurtplayers] =&gt; 1 [sbox_weapons] =&gt; 1 [secure] =&gt; 1 [sensor_debugragdoll] =&gt; 0 [sensor_stretchragdoll] =&gt; 0 [steamappid] =&gt; 4000 [sv_accelerate] =&gt; 10 [sv_airaccelerate] =&gt; 10 [sv_allowcslua] =&gt; 0 [sv_alltalk] =&gt; 0 [sv_bounce] =&gt; 0 [sv_cheats] =&gt; 0 [sv_contact] =&gt; [sv_footsteps] =&gt; 1 [sv_friction] =&gt; 8 [sv_gravity] =&gt; 600 [sv_hl2mp_item_respawn_time] =&gt; 30 [sv_hl2mp_weapon_respawn_time] =&gt; 20 [sv_maxspeed] =&gt; 10000 [sv_noclipaccelerate] =&gt; 5 [sv_noclipspeed] =&gt; 5 [sv_password] =&gt; 0 [sv_pausable] =&gt; 0 [sv_report_client_settings] =&gt; 0 [sv_rollangle] =&gt; 0 [sv_rollspeed] =&gt; 200 [sv_specaccelerate] =&gt; 5 [sv_specnoclip] =&gt; 1 [sv_specspeed] =&gt; 3 [sv_steamgroup] =&gt; [sv_stepsize] =&gt; 18 [sv_stopspeed] =&gt; 10 [sv_voiceenable] =&gt; 1 [sv_wateraccelerate] =&gt; 10 [sv_waterfriction] =&gt; 1 [teams] =&gt; Array ( ) [tv_enable] =&gt; 0 [tv_password] =&gt; 0 [tv_relaypassword] =&gt; 0 [version] =&gt; 49 ) ) </code></pre> <p>I only want to pick certain values from it; gq_type, gq_online, gq_hostname, gq_address, gq_port, gq_numplayers, gq_mapname.</p> <p>I want to insert these into a html table in one row, in the above order.</p> <p>Regards.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload