如何将.png图像作为背景添加到CodeIgniter的链接

I can't solve the problem.

I'm working on a PHP project with CodeIgniter, in the DisplayData views I have a table with data and in 2 columns I have links that when clicked call a function.

What I'm trying to do is use an image instead of links, ie set it as a link background.

I downloaded the image and inserted it in the folder where the views are (application/views/delete.png).

I tried to modify the CSS background-image: URL("basket.png"); but it doesn't work, I also tried to add the tag image

<a class=\"elimin\" href='deletedata?id=".$row-> id. "id> tag
<img src = "<? php echo base_url ('basket.png');?>
</a>

but he doesn't work either.

I also tried to write <img src = 'application/views/basket.png' /> but this doesn't work either

Can anyone tell me how can I do please?

DisplayData Views

echo "<tr>";
echo "<td> ".$row->id."</td>";
echo "<td>".$row->testo."</td>";
      echo "<input type=\"hidden\" name=\"myVariable\" value=\"'.$row->stato.'\"/><br/>";

      echo "<td>  Da fare </td>";


      echo "<td> 

<a class=\"modifica\" href='updatedata?id=".$row->id."'>Modifica</a>

</td>";

 //<input type='submit' name='update' value='Cancella'>

echo "<td><a class=\"elimina\" href='deletedata?id=".$row->id."'>
Elimina</a></td>";


  echo "</tr>";

First, you need a good folder structure. All the Images/JS/CSS/etc.. should be placed outside the application folder.

application <== where the code placed
assets  <== where all the Images/JS/CSS placed
   - images
   - css
   - js
system <== system file
index.php <== inedx file

Then below code will work

<img src="<?php echo base_url() ?>assets/images/basket.png"/>

FYI

In view no need to use echo all the time. you can just remove <?php from top of the file and just use HTML's. If you need anything with PHP just wrap those only with <?= ?>(PHP short tag must be enabled) or <?php echo ?>