Jump to content

[SOLVED] My math confuses me


mike12255

Recommended Posts

Im creating a forum were 10 posts are showen per page, and at the moment im trying to take the number of posts and dirive how many pages should be shown. So i created this formula.

 

2(y-5) =y+(y-10)

 

were y is equal to the total number of pages. so:

 

2(10-5) = 10+(10-10)

2(5) = 10 + 0

10 = 10

 

2(20-5) = 20+(20-10)

2(15) = 20+10

30=30

 

2(30-5) = 30+(30-10)

2(25) = 30+(20)

50 = 50

 

 

So the i expanded and simplified that equation:

 

2(y-5) = y+(y-10)

2y-10 = 2y -10y

2y-10= -8y

-10 = -8y -2y

-10 = -10y

-10*-10 =y

100=y

 

 

and in the end afteri finishe simplifying i forgot how i was using this equation and i got lost in my own math. Dont say this isnt related to php please because thisis the math that my code is going to run (the final equation) anyway anyone know what i was thinking when i did this? Y = the number of pages but I dont know howi figured out how to get the number of pages from the number of posts.

 

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.