Fianso's avatar

php variable inside js and html tag attribute

hi u all! i want to get php variable inside a html tag attribute id="$phpvar ", and iside getelementById("phpvar") how do we do that in blade?

0 likes
2 replies
Agbaje's avatar

By blade, I believe you are talking about Laravel. If so,

id = "{{ $var }}"
Fianso's avatar

it doesn't work i want to dynamically change a div id attribute by a $item->id, in order to get in script ,getelmentByID(??) how to do it in view?

Please or to participate in this conversation.