I have this return value from the result of my query.
Array ( [0] => stdClass Object ( [password] => $2y$10$6D7S2gNkcDciJ7g5z/8sie79iV3FCGhGUCFCPHU3cNNdeUVUbLfQC ) )
and this is my query,
$sql = "SELECT `$fields` FROM `$table` WHERE `$column` {$operator} '$value'";
if($this->_query = $this->_pdo->prepare($sql)) {
if($this->_query->execute()) {
$this->_result = $this->_query->fetchAll(PDO::FETCH_OBJ);
$this->_count = $this->_query->rowCount();
} else {
return $this->_error = true;
}
}
print_r($this->_result);
Now what I want is to display or print only the array data which is this $2y$10$6D7S2gNkcDciJ7g5z/8sie79iV3FCGhGUCFCPHU3cNNdeUVUbLfQC
Thanks in advance for any help. :D
$this->_result[0]['password']you should usePDO::FETCH_ASSOC.