title: Array to string conversion in nuSoap
body: <p>i'm trying to get a list of data from my database using a NuSoap web service .</p>
  
  <p>But when i execute , i get this error message :</p>
  
  <pre><code>Notice:  Array to string conversion in C:\wamp64\www\gcm\database.php on line 105
  PHP Warning:  mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\wamp64\www\gcm\database.php on line 112
  </code></pre>
  
  <p>I tested the function below in web page and i get the result (array table) :</p>
  
  <p>Array ( [0] => Array ( [titre] => list des docs [dateHeure] => 2018-04-16 [detail] => hello ) )</p>
  
  <p>This is my function :</p>
  
  <pre><code>function getHistoriqueNotification(){
  $com = new DbConnect();
  $message=array();
  $sql = "select alr_alertes.TITRE,alr_alertes.PHOTO,alr_historiques.DETAIL,alr_historiques.DATEHEURE,alr_alertes.CODE from alr_alertes,alr_historiques WHERE alr_alertes.ALRT_UID=alr_historiques.ALRT_UID" ;
  $result = mysqli_query($com-&gt;getDb(),$sql);
  while($row=mysqli_fetch_assoc($result)){
    $message[] = array(
  
        'titre'     =&gt;$row['TITRE'], 
        'dateHeure' =&gt;$row['DATEHEURE'],
        'detail'    =&gt;$row['DETAIL'],
        'code'      =&gt;$row['CODE']
      );
  }
  return ($message);
  }
  </code></pre>
  
  <p>Implementation of my Web service :</p>
  
  <pre><code>&lt;?php
  // Pull in the NuSOAP code
  require_once('lib/nusoap.php');
   require_once 'config.php';
  require_once 'database.php';
  // Create the server instance
  $server = new soap_server();
  $server-&gt;configureWSDL('Myservice_wsdl', 'urn:Myservice_wsdl');
  $server-&gt;soap_defencoding = 'UTF-8';
  
  $server-&gt;wsdl-&gt;addComplexType('Notifications',
      'complexType',
      'struct',
      'all',
      '',
      array(
              'titre' =&gt; array('name' =&gt; 'titre', 'type' =&gt; 'xsd:string'),
              'dateHeure' =&gt; array('name' =&gt; 'dateHeure', 'type' =&gt; 'xsd:date'),
              'detail' =&gt; array('name' =&gt; 'detail', 'type' =&gt; 'xsd:string'),
              'code' =&gt; array('name' =&gt; 'code' , 'type' =&gt; 'xsd:string')
  )
  );
  $server-&gt;wsdl-&gt;addComplexType('notificationArray',
      'complexType',
      'array',
      '',
      'SOAP-ENC:Array',
      array(),
      array(
              array('ref'=&gt;'SOAP-ENC:arrayType','wsdl:arrayType'=&gt;'tns:Notifications[]')
      ),
  'tns:Notifications'
  );
  $server-&gt;register('getHistoriqueNotification',
                          array(),
                          array('result' =&gt;'tns:notificationArray'),
                            'urn:MyService_wsdl',
                          'urn:MyService_wsdl#getHistoriqueNotification',
                          'rpc',
                          'encoded',
                          'Some comments about function 1'
  
  
                        );
   $server-&gt;service(file_get_contents("php://input"));
  
          ?&gt;
  </code></pre>