By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

array decleration

tolkienarda
100+
P: 316
hi all

i need a variable length array and i was just wondering if the code it is the same as i learned in VB. here is the code i am trying.
where $i is a counter
$rowcount is the number of rows
$arrayvariable[] is my variable lenght array
[PHP]
$i = 1;

while ($i < $rowcount)
{
$arrayvariable[$i] = $row[imgdata];
}
[/PHP]

thank you

eric
Feb 16 '07 #1
Share this Question
Share on Google+
3 Replies


ronverdonk
Expert 2.5K+
P: 4,258
Yes you can use this. But declare the empty array before you use it.

[php]
$arrayvariable = array();
[/php]

Ronald :cool:
Feb 16 '07 #2

tolkienarda
100+
P: 316
super awesome thanks

eric

looks like you are almost up to 2k posts
congrats
Feb 16 '07 #3

ronverdonk
Expert 2.5K+
P: 4,258
Thanks.

Ronald
Feb 17 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.