Jump to content

Finding the limit <<-- Loop Problem


paulman888888

Recommended Posts

Hi,

I've been stuck for awhile now;

 

Want to see what the lowest group a variable can fit under.

 

$my_var=8;// example

my array (Using print_r)

Array ( [0] => 7 [1] => 9 [2] => 11 ) 

 

First part of the array is just an id the second one is the one am after.

 

I want to loop though and find the lowest number by variable can fit under so in this case my_var is 8 so the lowest number it can go under is 9. And i would like to be able to store the answer in a variable.

 

Thankyou for your time

Paul

P.S Sorry if this is a newbie question. I've got back from a holiday (Spain) and i've seem to forgot alot of things :)

Link to comment
https://forums.phpfreaks.com/topic/187577-finding-the-limit/
Share on other sites

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.