I have the variable $style = [1, 2, 1]
; in php
and what I want is to send this Array
as you see it here, in the value
of a input
hidden
of HTML
, to capture it in my controller and use it in other opreations.
What I need is that this input
hidden
carry in its value
the Array
as it is ( [1, 2, 1]
), because when I'm going to use it in my operations, only this format is the who receives and unfortunately all my attempts have been unsuccessful, because they print me in a different way, I would appreciate your help.
$style = [1, 2, 1];
<input type="hidden" name="style" id="style" value=<?php $style ?>