I am trying to assign an image src to a variable, that doesn't seem to work.
I am pretty sure I am missing a " or a ' but I have just about tried every combination now.
The second issue I have is that I want to use two variables and concatenate doesn't seem to work.
see below: $item.$image
Any help would be appreciated.
<li class="first">
<?php
$image = "<img src="<?php echo base_url() . "assets/" . "menuicon.png" />
if (!empty($pcategory))
{
foreach ($pcategory as $key => $item)
{
echo "<li><a href='" . site_url() . "cat/$key'>$item.$image</a></li>";
}
}
?>
</li>