title: How to create a table from Soapclient result in PHP
body: <p>I'm trying to build a table from webservice response using php 5.3.x .</p>
  
  <p>This is a part of my WSDL:</p>
  
  <pre><code>     &lt;s:element name="CardStatementResponse"&gt;
      &lt;s:complexType&gt;
          &lt;s:sequence&gt;
              &lt;s:element minOccurs="0" maxOccurs="1" name="CardStatementResult" type="tns:CardStatementResult"/&gt;
          &lt;/s:sequence&gt;
      &lt;/s:complexType&gt;
  &lt;/s:element&gt;
  &lt;s:complexType name="CardStatementResult"&gt;
      &lt;s:sequence&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="CardHolder" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="AccountNo" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="Currency" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="MoreTrans" type="s:string"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="StartBalance" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="EndBalance" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="Transactions" type="tns:ArrayOfTransactionRecord"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="Delay" type="s:string"/&gt;
      &lt;/s:sequence&gt;
  &lt;/s:complexType&gt;
  &lt;s:complexType name="ArrayOfTransactionRecord"&gt;
      &lt;s:sequence&gt;
          &lt;s:element minOccurs="0" maxOccurs="unbounded" name="TransactionRecord" nillable="true" type="tns:TransactionRecord"/&gt;
      &lt;/s:sequence&gt;
  &lt;/s:complexType&gt;
  &lt;s:complexType name="TransactionRecord"&gt;
      &lt;s:sequence&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="STAN" type="s:string"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="TransactionDate" nillable="true" type="s:dateTime"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="TranType" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="TranTypeDesc" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="ReferenceNumber" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="ApprovalNumber" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="DebitCredit" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="TranCurr" type="s:string"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="TranAmount" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="TranActualAmount" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="TranActivityFee" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="AcctCurr" type="s:string"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="AcctCurrAmount" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="AcctActivityFee" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="AcctProcessFee" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="1" maxOccurs="1" name="AcctServiceFee" nillable="true" type="s:decimal"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="AcqPart" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="DataStorRet" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="CAID" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="CATI" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="CATA" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="MCC" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="ReversalFlag" type="s:string"/&gt;
          &lt;s:element minOccurs="0" maxOccurs="1" name="AuthorizationFlag" type="s:string"/&gt;
      &lt;/s:sequence&gt;
  &lt;/s:complexType&gt;
  </code></pre>
  
  <p>this is what i'm trying</p>
  
  <pre><code>   $result = $client-&gt;CardStatement(array('req' =&gt; $parameters));
         $row = $result-&gt;Transactions;
          print "
              &lt;div id='demo'&gt;
              &lt;table cellpadding='0' cellspacing='0' border='0' class='display' id='example' width='100%'&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Row&lt;/th&gt;
                      &lt;th&gt;TransactionDate&lt;/th&gt;
                      &lt;th&gt;DebitCredit&lt;/th&gt;
                      &lt;th&gt;TranAmount&lt;/th&gt;
                      &lt;th&gt;TranActualAmount&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;";
          foreach ($row as $k =&gt; $v) {
              if (($k + 1) % 2 == 0) {
                  $grade = 'odd_gradeX';
              } else {
                  $grade = 'even_gradeX';
              }
              print "
                  &lt;td align='right' class= $grade&gt;" . ($k + 1) . "&lt;/td&gt;              
                  &lt;td&gt;". $v-&gt;TransactionDate. "&lt;/td&gt;
                  &lt;td align='right'&gt;" . $v-&gt;DebitCredit . "&lt;/td&gt;
                  &lt;td align='right'&gt;" . $v-&gt;TranAmount . "&lt;/td&gt;
                  &lt;td align='right'&gt;" . $v-&gt;TranActualAmount . "&lt;/td&gt; ";
          }
          print "
              &lt;/tbody&gt;
              &lt;tfoot&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Row&lt;/th&gt;
                      &lt;th&gt;TransactionDate&lt;/th&gt;
                      &lt;th&gt;DebitCredit&lt;/th&gt;
                      &lt;th&gt;TranAmount&lt;/th&gt;
                      &lt;th&gt;TranActualAmount&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/tfoot&gt;
              &lt;/table&gt;
           &lt;/div&gt;";?&gt;
  </code></pre>
  
  <p>when om trying to access to Transactions i'm getting this error
  <code>Undefined property: stdClass::$Transactions</code>
  so my question is how can i access Transactions and
  how can i create a table from it?
  assuming that i'm using php SoapClient?</p>