Re: object oriented syntax in php
| From: | Sameer N Ingole | Date: | Tue, 28 Mar 2006 10:35:46 +0000 |
| Subject: | Re: object oriented syntax in php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232723@lists.php.net to get a copy of this message | ||
Merlin wrote:
Hi there, I do have problems with object oriented syntax as this is not familar to me. There is following output: [snip] Now I would like to retrieve my needed info out of it. How do I do this? (sounds a bit silly this question, sorry :-) I tried: $ping_result = $ping->ping('php.net'); echo $ping_result["net_ping_result"]["_raw_data"][5]; But this and other tries did not work. My goal is to find out wheter a specified site is reachable. Why not use something like this---code start--- if($ping->checkhost("php.net")) echo "I'm up"; else "ding!!"; ---code end--- if you are using PEAR -- Sameer N. Ingole Blog: http://weblogic.noroot.org/ --- Better to light one candle than to curse the darkness.