Re: [HTML_Form] cant change values in array after getAll()
| From: | Tomas V.V.Cox | Date: | Fri, 31 May 2002 09:39:31 +0000 |
| Subject: | Re: [HTML_Form] cant change values in array after getAll() | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1538@lists.php.net to get a copy of this message | ||
Zachery Hostens wrote:
>
> im using PHP 4.1.2 and the stock PEAR with MySQL
>
> i get the array using DB::getAll() fine
>
> but when i try to go
>
> 18 for( $i=0; $i<=count($res); $i++ ) {
> 19 $res[$i]['stamp'] = date( 'l, F dS @ h:i A',
> $res[$i]['stamp'] );
> 20 }
>
> i get this error ::
>
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 40 bytes) in
> /home/zacheryh/htdocs/news.php on line 19
>
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 40 bytes) in
> Unknown on line 0
>
> i have checked that the var is there in the array and it is a correct
> unix epoch. if i change the for() loop to this it works perfectly fine ::
>
> 18 for( $i=0; $i<=count($res); $i++ ) {
> 19 echo date( 'l, F dS @ h:i A', $res[$i]['stamp'] );
> 20 }
>
> it will then work perfectly fine...
>
> i was wondering what maybe causing this and how i can go about fixing ???
See the entry in php.ini:
memory_limit = 8M ; Maximum amount of memory a script may consume
(8MB)
Tomas V.V.Cox