How to concatenate a php variable value in this case

Asked

Viewed 87 times

-1

Well, I’m having trouble concatenating the value $value['id'] when I want to cross-reference it in the url in front of the id (where you have the ??).

The code is as follows:

<td><?= $value['feriasrestantes'] ?></td>
                    <td><a href='editf.php?id=??'> Editar</a></td>

I tried with the 'standard' ways but I could not do, someone has a solution?

1 answer

3


Just use the $value['id'] the same way you did with holidays, but at the point where you need to

Simple as that

<td><?= $value['feriasrestantes'] ?></td>
<td><a href="editf.php?id=<?php echo $value['id'] ?>"> Editar</a></td>

I used echo just to be clear. The thing is that Voce can display, echo for example, anywhere in HTML

  • How stupid, thank you very much!

  • 1

    if the answer helped you in any way, choose it as the best, so Voce also contributes with the site.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.