php - Notice, array to string conversion -
this question has answer here:
- array sting conversion notice. why? 1 answer
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
Post a Comment