Entries from September 2009 ↓

PHP Object Array Access: Cannot use object of type stdClass as array

To access an object in PHP you use a pointer. For example when using Browscap (http://code.google.com/p/phpbrowscap/) extract the values like so

$current_browser->Parent;

iPhone Code How to: Call a number from a function or button click

Below is the code to call a number within a function.

NSURL *phoneNumberURL = [NSURL URLWithString:@"tel:3053729787"];
[[UIApplication sharedApplication] openURL:phoneNumberURL];

I've tested this call function on both the iphone and ipod. The iphone opens a UIAlert and prompts the user to call or cancel. The ipod ignores the call without causing a crash (same as the simulator)