User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 375,229 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,264 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Initialization of an Array

Join Date: Dec 2007
Posts: 307
Reputation: OmniX is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Whiz

Initialization of an Array

  #1  
May 9th, 2008
I use an array for the first time in a while loop without declaring it(as php does not need it)
  1. $variable_array[] = $fetch_array['column'];

As the while loop is repeating it increases the number of the array.
Am I doing this right?

Should I have before the loop some code like:
  1. $variable_array = array();

Dont know abit confused and lost.

Thanks, Regards X
Last edited by OmniX : May 9th, 2008 at 4:40 am.
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 3:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC