Read paramater from request


#1

how to read variable value from request dynamically
i.e.

request contains variable with these names 1,2,3,4,5…,n

how to read these variable with loop
i tried this code but it doesn’t work

i = 1
while (input=params[:’#{i}’] != nil)
puts input
i = i +1
end

please i want the right code

thx


#2

Mohamed wrote:

puts input
i = i +1
end

please i want the right code

thx

Try

params.keys.sort.each do |key|
puts params[key]
end


http://www.5valleys.com/


#3

thanks (Y)