Moin Liebe leute
Ich habe mal wieder ein Problem in PHP, ich möchte ein Array in Variablen umwandeln bsp:
Ausgabe des Arrays

PHP-Code:


Array
(
    [
success] => 1
    
[client] => Array
        (
            [
id] => 20
            
[email] => demo
            
[password] => demo
            
[lastlogin] => demo
            
[ip] => demo
            
[host] => v
            
[status] => Active
            
[parent_id] => 0
            
[firstname] => demo
            
[lastname] => demo
            
[companyname] => 
            [
address1] => demo
            
[address2] => 
            [
city] => demo
            
[state] => demo
            
[postcode] => demo
            
[country] => DE
            
[phonenumber] => demo
            
[datecreated] => demo
            
[notes] => 
            [
language] => german
            
[company] => 0
            
[credit] => 0.00
            
[taxexempt] => 0
            
[latefeeoveride] => 0
            
[cardtype] => demo
            
[cardnum] => 
            [
expdate] => 
            [
overideduenotices] => 0
            
[client_id] => 20
            
[currency_id] => 0
            
[geburtsdatum] => 
            [
countryname] => Germany
        
)

    [
call] => getClientDetails
    
[server_time] => 1331232576

Ich habe es mit einer schleife versucht, mein verständnis begreift es leider nicht, bitte um hilfe

PHP-Code:
<?php
   $url 
'demo';
   
$post = array(
      
'api_id' => 'demo',
      
'api_key' => 'demo',
      
'call' => 'getClientDetails',
      
'id'=>40
   
);
   
$ch curl_init();
   
curl_setopt($chCURLOPT_URL$url);
   
curl_setopt($chCURLOPT_POST1);
   
curl_setopt($chCURLOPT_TIMEOUT30);
   
curl_setopt($chCURLOPT_RETURNTRANSFER1);
   
curl_setopt($chCURLOPT_POSTFIELDS$post);
   
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
   
curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
   
$data curl_exec($ch);
   
curl_close($ch);
  
   
$return json_decode($datatrue);
   
print_r($return);
?>
Ich danke um mithilfe. lg