Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8303413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:32:04+00:00 2026-06-08T17:32:04+00:00

Okay, first let me show you my script. <?php $soap_exception_occured = false; $wsdl_path =

  • 0

Okay, first let me show you my script.

<?php  
$soap_exception_occured = false;

$wsdl_path = 'http://vrapi.xyz.com/?wsdl';

$response = '';

ini_set('soap.wsdl_cache_enabled', '0'); // disabling WSDL cache

try {
    $client = new SoapClient($wsdl_path);
    }

catch(SoapFault $exception) {
    $soap_exception_occured = true;
    $response .= '\nError occoured when connecting to the SMS SOAP Server!';
    $response .= '\nSoap Exception: '.$exception;
    } 

/* Create a Recharge at VR */
$client_id = 'appl45fgysssl';

$balance_info = new stdClass(); 
try {  
$balance_info = $client->GetBalanceInfo($client_id); 
} 

catch(SoapFault $exception) { 
 $soap_exception_occured = true;  
 $response .= "\nError occoured at method GetBalanceInfo($client_id)";  
 $response .= "\nSoap Exception: ".$exception; 
 } 

 /* Do something or print results */
 if($soap_exception_occured || $balance_info==null) echo $response; 
 else print_r($balance_info); 

 ?>

And Output in browser

stdClass Object ( [client_user_id] => appl45fgysssl [available_credit] => 9755 [last_updated_time] => 2012-07-29 14:30:15 ) 

I want to display the data into a well arranged format. Ex.

Client: appl45fgysssl

Balance: 9755

Time: 2012-07-29 14:30:15

Please help me to do that. Any reference should be fine for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:32:05+00:00Added an answer on June 8, 2026 at 5:32 pm

    To output the results in a human readable form, as opposed to print_r, you could simply cycle through the results in a foreach loop;

    foreach($balance_info as $key=>$value) {
        echo "$key: $value<br />";
    }
    

    Or for more specific naming, if you know what the columns are, using a -> to access the objects properties and echo them out;

    Client: <?php echo $balance_info->client_user_id; ?><br />
    Balance: <?php echo $balance_info->available_credit; ?></br />
    Time: <?php echo $balance_info->last_updated_time; ?>
    

    http://php.net/manual/en/sdo.sample.getset.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay first let me tell you the story behind the question. We have a
Okay so I want to delete the first occurrence of a string, let's say,
Okay at first I thought this would be pretty straightforward. But I can't think
Okay this is my first WPF app and I am having a hard run
Okay. I have completed my first python program.It has around 1000 lines of code.
First off, I'm using XCode 4.0.2. Okay, here is my issue. I can build
first, I can't stand Crystal! Okay, that's off my chest... Now, we have an
Okay, just learnt LINQ syntax about ten minutes ago, made a first program: public
Okay, so at first when i run my win32 program the menu works fine,
I have one problem with semaphores, I though you could help me.. Okay first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.