PHP - Struct In Php?
Hi all,
Recently I've been doing some work with C++, and I've been learning about it's struct keyword. I've never come across it in PHP but I was just wondering whether there would be such a thing in it? ie: struct point{ int x; int y; } POINTS; Many Thanks! Similar Tutorialshello guys., I need small help from. I am a java developer and am not well acquainted with php. I am developing a java application which calls a php web service (sugar CRM soap webservice)., so one of the web service method (login) takes a php struct as a parameter, user_auth which has three parameters username, password and version, all of them are strings. Can any one tell me what will be the output structured like when we print out the user_auth struct. I tried: 1) String user1 = "user_auth{username=will; password=18218139eec55d83cf82679934e5cd75; version=1.0;}"; 2) String user2 = "{'user_auth':{'username':'will','password':'18218139eec55d83cf82679934e5cd75', 'version':'1.0'}}"; Does any of the above strings match the output of a struct in php? If not what should it be like?? This would be of a great help for me if any one can tell me whats the right now. Thanks, aspr I am trying to use this: http://php.net/manual/en/function.xml-parse-into-struct.php to parse this: Code: [Select] <?xml version="1.0" encoding="utf-8"?> <PaymentNotification xmlns="http://"> <PaymentMethod>card</PaymentMethod> <Hash>12345KKLS</Hash> <Payments> <Payment> <PaymentID>709750ba-b9b6-44c4-9812</PaymentID> <Amount>70</Amount> <Currency>USD</Currency> <Date>2011-05-11T07:41:44.957</Date> <StatusID>4</StatusID> </Payment> <Payment> <PaymentID>e0c66bae-c423-43c6-b896</PaymentID> <Amount>50</Amount> <Currency>USD</Currency> <Date>2011-05-11T07:42:13.55</Date> <StatusID>2</StatusID> </Payment> </Payments> </PaymentNotification> ...but can't work out which numbers to use. I only need to grab the payment ID where the statusID is 4 (for each one as could be 1 or more per xml message). It's very complicated http://php.net/manual/en/function.xml-parse-into-struct.php |