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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.