i have the following code
@php
$id = some integer
echo '<'.input type="hidden" class="id" name="id" value="$id". '>'
@endphp
how can i use this $id
variable inside html
element attribute
it produce the following error
Parse error: syntax error, unexpected '$id' (T_VARIABLE), expecting ',' or ';' (View: C:\xampp\htdocs\blog\resources\views\post\userposts.blade.php)