php - Laravel Input::has always returning true -
I know this is probably something simple, but I do not know where I went wrong. Basically I have 2 static php arrays:
$ array1 = array ('Apple', 'Orange'); $ Array2 = array ('purple', 'green', 'yellow'); Forex Currency ($ 2 as $ arr2) {foreach ($ arr1 $ arr1) {if (Input :: is ($ arr2. $ Arr1)) {array_push ($ testArray, $ arr1); }}}
The output of $ testArray
shows that the input: the number of inputs is output twice, so if I select all the possible inputs (Which is 5), then each of them has to output 10 values twice. It has made me believe that the input :: has evaluated the correct every time, even if it can not be as long as I can tell.
Any help is appreciated!
PHP thinks $ arr2 $ Arr1
is a concatenation:
if (input :: is ($ arr2. $ Arr1)) {array_push ($ testArray, $ arr1); }
Try using it in your point notation:
if (input :: is ("{$ Arr2} {$ Arr1} ")) {array_push ($ testArray, $ arr1); }
Comments
Post a Comment