Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Db\TableGateway\Feature;
use Zend\Db\Sql\Select;
use Zend\Session\Container;

Hi i am new to ZF2 and i couldn't able to echo it.

$rowset = $this->tableGateway->select(array('id' => $id));
$row = $rowset->current();
echo $row->name;
share|improve this question
    
What is the content of var_dump($row) ? –  Anjith K P May 26 '13 at 10:53
    
Do you have "name" field in database? –  Anjith K P May 26 '13 at 11:13
    
yeah there is name field.... –  Jaffar Raza May 26 '13 at 13:44
1  
Have you tried to print $row? –  Anjith K P May 26 '13 at 16:44

1 Answer 1

Please try with

echo $row['name'];

This works from me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.