GroundZero
Programmer
is there a way I can create variables inside a for loop each time it loop?
here is what I have:
//connect to database
$connect = odbc_connect("$DBname", "", ""
or die("couldn't connect."
;
$connection=odbc_do($connect);
$num=odbc_num_fields($connection);
for ($i=1,$i<=$num,$i++)
$field($i)=odbc_field_name($connection,$i);
$field would be the variable that need to store value at each loop.I added the $i counter for it to be different everytime. Am I doing this the right way?
thank you in advance,
GroundZero Your soul is imperfect
Life is difficult...
Now guess why we're here
here is what I have:
//connect to database
$connect = odbc_connect("$DBname", "", ""
$connection=odbc_do($connect);
$num=odbc_num_fields($connection);
for ($i=1,$i<=$num,$i++)
$field($i)=odbc_field_name($connection,$i);
$field would be the variable that need to store value at each loop.I added the $i counter for it to be different everytime. Am I doing this the right way?
thank you in advance,
GroundZero Your soul is imperfect
Life is difficult...
Now guess why we're here