variable sized arrays & global vars - another newbie question

From: Date: Tue, 15 Jul 2003 12:39:47 +0000
Subject: variable sized arrays & global vars - another newbie question
Groups: php.general 
Request: Send a blank email to php-general+get-155275@lists.php.net to get a copy of this message
Hi all, yet again im struggling with php syntax after to many years with c. If anyone can help or point me to some good doc's i'd would really appreciate it! My two questions are: Can i declare an array that doesnt have a fixed size? Basically i want to assign the results of a query to the array but obviously the query results can change. Something along the lines of: while($temp=mssql_fetch_array($tmresult)){ brandnew array = $temp["fieldname"]; } this doesnt work for me, any ideas? Also is it possible to have global variables within php? I have noticed that if i create a function i cant write to what i thought were global variables(declared outside the function). Im not trying to pass variables between pages, just use a global counter within a single page? Thanks for any help in advance! --------------------------------- Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

« previous php.general (#155275) next »