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
https://forums.phpfreaks.com/topic/145667-solved-my-math-confuses-me/
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.