Jump to content

count array, limit array , and update the array!


canabatz

Recommended Posts

hi

 

after trying to limit users records in a table grid ,i want to see if there is a way with php array to do what i need!

 

i got for example list of users:

 

dan

dan

rob

dan

simon

david

simon

simon

simon

simon

dan

david

 

i want to limit the users to have only 3 records in the list one after one!

if you got 3 ,thats ok ,if you got 4 (like simon) that is over the rule!

so then i want for example to delete the over the rule record!

 

is it possible to put the names in the array for count row by row ,and when you find user that got over 3 ,delete this record

from the database!

 

something like:

 

if $first_name > 3 ,'delete first_name from....'

 

i was searching and i tryd to learn how array's are working ,but it is little complicated for me!

 

any help will be very very appreciated !!

 

tahnx

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.