I'm having trouble displaying the value of an array inside the heredoc input field. Here is the code snippet:
class Snippet{ protected $_user; protected $_class; protected $_messages; public function __construct(){ $this->_user = $this->_class = NULL; $this->createUser(); } public function createUser(){ $keys = array('user_login','user_email'); $this->_user = $this->_class = array_fill_keys($keys, ''); } public function userErrors(){
My output gives a marked input field with a value displayed as Array[user_login]
. I can assign an array to separate the variables and get the result I'm looking for, but this seems like an unnecessary waste. PHP 5.3.5
source share