Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 Looking for some simple php help

View previous topic View next topic Go down 
AuthorMessage
FixIt
Member
Member
avatar

Posts : 2
Join date : 2011-05-11

Looking for some simple php help Empty
PostSubject: Looking for some simple php help   Looking for some simple php help EmptyWed May 11, 2011 10:48 pm

Ive got some extra credit for my php class and I'm allowed to be asking for help on this.

What I have is an array like this:
$b = array(10, 15, 2, 30, 6);

Next, I have a form that will be "simulating taking money," thus giving me this value:
$money = $_POST['input_m'];

What I'm looking for is a solution for the code to go through each value and return how many of the current $b array value.

For example, I can type "15" in the money field, the program will return:
(0, 1, 7, 15, 3), and all of the other possible solutions.

Back to top Go down
Chemical
Member
Member
Chemical

Posts : 6
Join date : 2011-05-11

Looking for some simple php help Empty
PostSubject: Re: Looking for some simple php help   Looking for some simple php help EmptyWed May 11, 2011 10:49 pm

I don't understand what you are looking to do here. What is the relationship between the first array $b, and the ending program results with the introduction of the 15?
Back to top Go down
Staked
Member
Member
Staked

Posts : 4
Join date : 2011-05-05

Looking for some simple php help Empty
PostSubject: Re: Looking for some simple php help   Looking for some simple php help EmptyWed May 11, 2011 10:50 pm

You're not the only one Chemical

He's not mentioned what the link between them is - just that they're supposed to be used together somehow.
Back to top Go down
Chemical
Member
Member
Chemical

Posts : 6
Join date : 2011-05-11

Looking for some simple php help Empty
PostSubject: Re: Looking for some simple php help   Looking for some simple php help EmptyWed May 11, 2011 10:51 pm

Staked wrote:
You're not the only one Chemical

He's not mentioned what the link between them is - just that they're supposed to be used together somehow.

Ok *whew*, glad to hear my math skills haven't gotten that bad yet. Lol.
Back to top Go down
Staked
Member
Member
Staked

Posts : 4
Join date : 2011-05-05

Looking for some simple php help Empty
PostSubject: Re: Looking for some simple php help   Looking for some simple php help EmptyWed May 11, 2011 10:51 pm

Heh, same here :)
Back to top Go down
Sponsored content




Looking for some simple php help Empty
PostSubject: Re: Looking for some simple php help   Looking for some simple php help Empty

Back to top Go down
 

Looking for some simple php help

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Help With Simple Game
» Simple Amazon Monetizing TuT
» Simple for loop question
» Very useful simple coding tip - how to save time working with lists

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: Looking for some simple php help Edit-trash Useless :: Trash-