Coder Social home page Coder Social logo

get contact about php-ews HOT 5 CLOSED

garethp avatar garethp commented on August 10, 2024
get contact

from php-ews.

Comments (5)

Garethp avatar Garethp commented on August 10, 2024

It looks to me like you were able to get the phone numbers, addresses and email addresses just fine. What problem are you having?

from php-ews.

fury118 avatar fury118 commented on August 10, 2024

I just want to get the phone mumber as a var and not as un object
to have an "echo" like "teltest"

from php-ews.

Garethp avatar Garethp commented on August 10, 2024

You know how to use PHP, right? You should be able to just get the value from the object...

from php-ews.

fury118 avatar fury118 commented on August 10, 2024

I find the way. I'm still disturbed by the ->get_()

here my code:

getContacts(); echo($contacts[2]->getItemId()->getId())."
"; echo($contacts[2]->getGivenName())."
"; echo($contacts[2]->getSurname())."
"; echo($contacts[2]->getjobTitle())."
"; echo($contacts[2]->getCompanyName())."
"; echo($contacts[2]->getLastModifiedTime())."
"; echo($contacts[2]->getPhysicalAddresses()->Entry->getStreet())."
"; echo($contacts[2]->getPhysicalAddresses()->Entry->getPostalCode())."
"; echo($contacts[2]->getPhysicalAddresses()->Entry->getCity())."
"; echo($contacts[2]->getPhysicalAddresses()->Entry->getState())."
"; echo($contacts[2]->getPhysicalAddresses()->Entry->getcountryOrRegion())."
"; echo($contacts[2]->getPhoneNumbers()->Entry[0]->get_())."
"; echo($contacts[2]->getPhoneNumbers()->Entry[1]->get_() )."
"; echo($contacts[2]->getPhoneNumbers()->Entry[2]->get_() )."
"; echo($contacts[2]->getEmailAddresses()->Entry->get_())."
"; ?>

here the result:

A_DEEZ4T_*****_DlERi1EDFAAD_xG9V_TAvWT_VRAArfeAA==
prenomtest
nomtest
fonctiontest
societetest
2016-07-08T07:35:26Z
ruetest
cptest
villetest
deptest
paystest
faxtest
teltest
porttest
[email protected]

from php-ews.

Garethp avatar Garethp commented on August 10, 2024

You can replace the get_() by casting to string. So you can either do

$contacts[2]->getPhoneNumbers()->Entry[2]->__toString()

Or

echo ((string) $contacts[2]->getPhoneNumbers()->Entry[2]);

from php-ews.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.