Tjk Posted May 1, 2006 Share Posted May 1, 2006 [a href=\"http://pastebin.com/692931\" target=\"_blank\"]http://pastebin.com/692931[/a]$pingtime just echos as "ARRAY" on the page at the moment. What I'm trying to do from here is to create a way of registering if a server responds to a ping and if not then display "offline". Any ideas how I could do this from here?((Had to use postbin because of the forum security feature bug)) :)Regards Link to comment https://forums.phpfreaks.com/topic/8844-lacking-direction-on-an-array/ Share on other sites More sharing options...
Zane Posted May 1, 2006 Share Posted May 1, 2006 So apparently $pingtime is only an array if the ping was successfulright?so set an IF statement, or my favorite a ternary statement that does this[code]echo is_array($pingtime)?"online":"offline";[/code]note that that would only display offline or onlinethis is a 3rd party scriptit's being moved thereplease post in the correct forum Link to comment https://forums.phpfreaks.com/topic/8844-lacking-direction-on-an-array/#findComment-32455 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.