Codeingniter3 echo a single element of an associative array
<p>Let's assume I have this controller function</p>

<pre><code>public function index(){
    $this-&gt;load-&gt;model('model_users');
    $clienteemail = $this-&gt;session-&gt;userdata('email');
    $cliente['nome'] = $this-&gt;model_users-&gt;lettura_dati($clienteemail);

    $data['title']='La Giumenta Bardata Dashboard'; //array per titolo e dati passati

    $this-&gt;load-&gt;view('auth/template/auth_header', $data);
    $this-&gt;load-&gt;view('auth/template/auth_nav', $cliente);
    $this-&gt;load-&gt;view('auth/clienti/auth_sidebar');
    $this-&gt;load-&gt;view('auth/clienti/client_dash');
    $this-&gt;load-&gt;view('auth/template/auth_footer');
}
</code></pre>

<p><code>model_users</code> is a model that query the db with this function:</p>

<pre><code>public function lettura_dati($clienteemail)
{
  $this-&gt;db-&gt;where('email', $clienteemail);
  $query = $this-&gt;db-&gt;get('user');
  if ($query) {
    $row = $query-&gt;row();
    $cliente['nome'] = $row-&gt;nome;
    return $cliente;
  } else {
    echo "errore nella ricerca del nome";
  }
</code></pre>

<p>What I'm trying to do is to use an user email from the session data to retrieve info from the db table.</p>

<p>so I start to retrieve just the name of the user. 
The function works, but when in the view I use <code>echo $nome;</code> </p>

<p>I have an error about the conversion between array and string... that's normal, I know, but if I do </p>

<pre><code>print_r($nome); 
</code></pre>

<p>my output is: <code>Array[0] =&gt; 'Pippo'</code> </p>

<p>I just want to output the content of the array. 
How can I achieve this?</p>