Am Dienstag, 15. Juli 2003 14:39 schrieb bob pilly: > 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:
$myarray= array(); > while($temp=mssql_fetch_array($tmresult)){ > brandnew array = $temp["fieldname"]; $myarray[]= $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? $globalvar= 'Hi there'; function afunction() { global $globalvar; echo($globalvar); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php