"AJ" wrote:[color=blue]
> "steve" <UseLinkToEmail@dbForumz.com> wrote in message
> news:10g8b80gp3bec61@news.supernews.com...[color=green]
> > "Pjotr Wedersteers" wrote:[color=darkred]
> > > SamMan wrote:
> > > > Is there an easy way to re-initialize an array, other[/color][/color]
> than[color=green]
> > looping[color=darkred]
> > > > through it’s length and setting the values to[/color][/color]
> null, or ""?[color=green][color=darkred]
> > > Would
> > > > unset() be a wise choice?
> > > >
> > > > Thanks again
> > > Array_fill ?[/color]
> >
> > If you want it to still be an "array" after initialization, do:
> > $a = array();[/color]
>
> I posted a question a while ago about this and am wondering if it[/color]
will[color=blue]
> solve
> my problem as well. It’s for a shopping cart system that I
> wrote. What
> happens is that the cart is stored in a table while the visitor is
> filling
> it up. The current cart is displayed at the top right of the[/color]
screen.[color=blue]
> When
> the visitor clicks on checkout, I wanted to carry on displaying the
> current
> cart AND have the full contents in the main body of the page. The
> problem
> was that the array had already reached the end so it wouldn’t
> work and just
> displayed nothing the second time around.
>
> Is this the same issue as this poster and will the answer be good[/color]
for[color=blue]
> me?
>
> Cheers
>
> Andy[/color]
Hard to tell, AJ. If the 2nd time around you are showing a new page,
then everything is already initialized. Perhaps you can give it a
try, and post a simplified version of your code.
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/PHP-initiali...ict133056.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=445075