note 97727 added to function.array-push
| From: | DanielC dot -daniel dot costa dot silva at gmail dot com | Date: | Wed, 05 May 2010 13:23:07 +0000 |
| Subject: | note 97727 added to function.array-push | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168959@lists.php.net to get a copy of this message | ||
public function listar(){
try{
$this->stmt = $this->conexao();
$rs = $this->stmt->prepare("SELECT idCategoria,categoria
FROM categoria c
ORDER BY categoria");
$rs->execute();
if($rs->rowCount() > 0){
$list = array();
while($row = $rs->fetch(PDO::FETCH_OBJ)){
$categoria = new Categoria();
$categoria->setIdCategoria($row->idCategoria);
$categoria->setCategoria($row->categoria);
array_push($list, $categoria);
}
return $list;
}
}catch (PDOException $e){
echo $e->getMessage();
}
}
----
Server IP: 187.16.23.134
Probable Submitter: 200.179.37.98
----
Manual Page -- http://www.php.net/manual/en/function.array-push.php
Edit -- https://master.php.net/note/edit/97727
Del: integrated -- https://master.php.net/note/delete/97727/integrated
Del: useless -- https://master.php.net/note/delete/97727/useless
Del: bad code -- https://master.php.net/note/delete/97727/bad+code
Del: spam -- https://master.php.net/note/delete/97727/spam
Del: non-english -- https://master.php.net/note/delete/97727/non-english
Del: in docs -- https://master.php.net/note/delete/97727/in+docs
Del: other reasons-- https://master.php.net/note/delete/97727
Reject -- https://master.php.net/note/reject/97727
Search -- https://master.php.net/manage/user-notes.php