Problem inserting string into array
Posted: Fri Apr 22, 2011 7:20 am
Hi..i'm trying to insert an implode generated string to an array that then later be used for json implementation
the implode generated string is look like this
i would like to used it in this code
to achieve something like this
instead i got something like this
seem like generated string is treated as one element as key and value pair.
obviously i can get expected output from mysql because of this, can anybody help me with this
the implode generated string is look like this
Code: Select all
'id' => $this->_SqlResult[0],'UserId' => $this->_SqlResult[1],'Msg' => $this->_SqlResult[2],'MsgStamp' => $this->_SqlResult[3]
Code: Select all
$this->_JsonArr[]=array($Generated string);Code: Select all
$this->_JsonArr[]=array('id' => $this->_SqlResult[0],'UserId' => $this->_SqlResult[1],'Msg' => $this->_SqlResult[2],'MsgStamp' => $this->_SqlResult[3]);
Code: Select all
$this->_JsonArr[]=array(" 'id' => $this->_SqlResult[0],'UserId' => $this->_SqlResult[1],'Msg' => $this->_SqlResult[2],'MsgStamp' => $this->_SqlResult[3]");
seem like generated string is treated as one element as key and value pair.
obviously i can get expected output from mysql because of this, can anybody help me with this