hi. I have variables named
update1 update2 . . . . update20
which are created onpage one with the digit on the end being the id.
However, I wish only to get the integer
ie update2 -> 2
Anybody got any clues. hanks a illion
Well, that's how it can be done:
while($i<20){ $variable_name='update'.$i; $variable_value=${$variable_name}; $i++; }
Is that what you need?
sort of. the problem is that i dont know exactly where the index finishes. I just used 20 as an example
it could go up to update1234.
if you can help again thanks
Why dont you count them? I mean, are these variables on a database? If they are it's pretty straightforward.
Slect count(*) from table where field like 'update%';
Thanks guys.
I figured it out.
Alex
Well, could you enlighten the rest of us - please??