Código PHP :
<?php
class dateCalc{
public $fecha;
public $db_rowFecha;
public $db_rowID;
public $db_table;
public $database;
private $contador;
private $data;
function __construct($database, $table, $rowFecha, $rowID){
$this->fecha=date('Y-m-d');
$this->db_rowFecha=$rowFecha;
$this->db_rowID=$rowID;
$this->db_table=$table;
$this->database=$database;
$this->contador=0;
mysql_select_db($this->database);
$query=mysql_query("SELECT ".$this->db_rowFecha.", ".$this->db_rowID." FROM ".$this->db_table."");
while($result=mysql_fetch_array($query)){
$this->data=array($this->contador=>array($result[1], $result[0]));
$this->contador++;
}
var_dump($this->data);
// arroja array(1) { [490]=> array(2) { [0]=> string(3) "491" [1]=> string(10) "2013-01-31" } }
var_dump($this->data[10]);
// arroja NULL
}
function algo(){
}
}
?>
Mi problema es que cuando deseo tomar 1 valor especifico del array "data" no lo puedo ver me marca que esta vacio
