I initialize a NSArray like below.
NSArray *myArr = [[NSArray alloc]initWithObjects:name, empID, phone, email, website, nil];
myArr is supposed to have 5 elements. But [myArr count] shows only 4 elements.
EDIT:
One of the object website was nil in the array.
Are you sure that all five of your objects are valid? If website is nil your array would only have four elements.
You can’t add
nilobjects to a dictionary. You can add a specialNSNullobject if you need to do something equivalent.