Print NSString Argument using NSLog

user559142 picture user559142 · Jul 6, 2011 · Viewed 36.8k times · Source
-(void) postToDB:(NSString*) msg{
    //print msg
    NSString *myphp = @"/Applications/MAMP/htdocs/databases/test.php";
    NSURL *url = [NSURL URLWithString:myphp];
    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
    [request setPostValue:msg forKey:@"message"];
}

In the above method, how can I print 'msg' using NSLog?

Many thanks

Answer

Praveen S picture Praveen S · Jul 6, 2011

NSLog(@"%@",msg); its of type NSString.