php - Notice, array to string conversion -


this question has answer here:

i have issue in codeigniter script, can't seem figure out issue is, can possibly help.

$a =  '<a href="' . $item['href'] . '" class="' . $aclass . '">' . $item['text'] . '</a>'; 

error: severity: notice

message: array string conversion

filename: libraries/menu.php

line number: 193

copied comment

this var_dump produces:

severity: notice message: array string conversion filename: libraries/menu.php line number: 193  

and var_dump of $item

array (size=3)    'href' => string '/for-sale/' (length=10)    'text' => array (size=0) empty    'children' => null 

your text variable array, why it's showing error.

you try add using : implode(' ', $item['text']) or change $item['text'] turn string.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -