Re: get value of array without key
| From: | Prasit Narkdee | Date: | Wed, 14 Jul 2004 06:18:17 +0000 |
| Subject: | Re: get value of array without key | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190448@lists.php.net to get a copy of this message | ||
"Jason Wong" <php-general@gremlins.biz> wrote in message
news:200407141320.52688.php-general@gremlins.biz...
> On Wednesday 14 July 2004 11:54, Prasit Narkdee wrote:
> > $tmp = unpack("d", substr($this->data, $spos + 6,
8));
> > // It machine machine dependent
> >
> > if ($this->isDate($spos)) {
> > list($string, $raw) =
$this->createDate($tmp['']);
> > // $this->addcell(DateRecord($r, 1));
> > }else{
> > $raw = $tmp[''];
> > if (isset($this->_columnsFormat[$column + 1])){
> > $this->curformat =
> > $this->_columnsFormat[$column + 1];
> > }
> >
> > $string = sprintf($this->curformat, $tmp[''] *
> > $this->multiplier);
> >
> > // $this->addcell(NumberRecord($r));
> > }
> >
> >
> > $raw = $tmp[''];
> > some server can get value of first element of array but some server $raw
is
> > empty
> > how can i sole it?
> > What variable in php.ini must modify?
>
> First of all I have no idea what your code is trying to do. But if you're
> simply trying to get the first element from an array then use
array_shift()
> or array_slice().
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> The clash of ideas is the sound of freedom.
> */
i use class Spreadsheet_Excel_Reader i found in google
some server is no problem and get $tmp[''] value
but when i run this script in some server $tmp[''] is emptry
case Spreadsheet_Excel_Reader_Type_NUMBER:
$row = ord($this->data[$spos]) |
ord($this->data[$spos+1])<<8;
$column = ord($this->data[$spos+2]) |
ord($this->data[$spos+3])<<8;
$tmp = unpack("d", substr($this->data, $spos + 6, 8));
// It machine machine dependent
if ($this->isDate($spos)) {
list($string, $raw) = $this->createDate($tmp['']);
// $this->addcell(DateRecord($r, 1));
}else{
$raw = $tmp[''];
if (isset($this->_columnsFormat[$column + 1])){
$this->curformat =
$this->_columnsFormat[$column + 1];
}
$string = sprintf($this->curformat, $tmp[''] *
$this->multiplier);
// $this->addcell(NumberRecord($r));
}
$this->addcell($row, $column, $string, $raw);
//echo "Number $row $column $string\n";
break;