Usage Import - Stefanius67/VCard GitHub Wiki
// create object and read file
$oVCard = new VCard();
$iContactCount = $oVCard->read($strFilename);
// iterate through imported contacts
for ($i = 0; $i < $iContactCount; $i++) {
$oContact = $oVCard->getContact($i);
$strName = $oContact->getName();
// ... read more properties
// iterating through all addresses
$iCount = $oContact->getAddressCount();
for ($j = 0; $j < $iCount; $j++) {
$oAddress = $oContact->getAddress($j);
$strStr = $oAddress->getStr();
// ... read more properties
}
// phonenumbers
$iCount = $oContact->getPhoneCount();
for ($j = 0; $j < $iCount; $j++) {
$aPhone = $oContact->getPhone($j);
$strType = $aPhone['strType'];
$strPhone = $aPhone['strPhone'];
}
$iCount = $oContact->getEMailCount();
for ($j = 0; $j < $iCount; $j++) {
$strMail = $oContact->getEMail($j);
}
}