Twig create link with variable
Use the ~ symbol to concat strings.

//loop through all database entries
{% for val in entries %}
    .....
    &lt;a href="{{ url('pluginName/editEntry/' ~ val.id) }}"&gt;Edit&lt;/a&gt;
    .....
{% endfor %}