i pass an array to my view and i can't show element in my view ! THis is my array : Array ( [pin] => 00000 [card] => 00000 [status] => Y). thnx for helping me .
suppose you have array
$arrayData = array ( 'pin' => 00000, 'card' => 00000, 'status' => Y);
$viewModel = new \Zend\View\Model\ViewModel();
$viewModel->setVariables($arrayData);
Now, on view you can directly access as-
$pin, $card, etc
this will add a single varibale to the view-
$viewModel->setVariable('testVar', 'abc');
on view page, just use as
$testVar;