Reputation: 23
I'm working on a website for my internship and i'm facing some troubles. I want to create a button with a special value. I'll link my code below so you'll be able to understand easier what i'm talking about :
<input type="button" class="newu" value="<i class='fa fa-pencil-square' aria-hidden='true'></i> <?php echo $nom_prod['nom_produit'] ; ?>"/>
The problem is that quotes aren't working like i would like them to since i'm using xxx times simple and double quotes. If you guys have any clue how i could manage to fix this it would be really nice to tell me how.
Thanks in advance & bybye.
Upvotes: 2
Views: 1476
Reputation: 139
Looking at your requirement you need to use tag instead of using tag. Refer the difference here..
You can have almost anything between tags.
And if you really want to go conventional way then you wrap your tag with other tags and set your values inside that using javascript. But that's impracticable.
Upvotes: 0
Reputation: 1899
You could try using a button element instead of an input.
<button class="newu"> <i class='fa fa-pencil-square' aria-hidden='true'></i> <?php echo $nom_prod['nom_produit'] ;?> </button>
Good luck with your internship and happy coding!
Upvotes: 2