The data read from the database by php paging (urgent) is as follows: Array (& nbsp; [p_id] & gt; 8 & nbsp; [title] & gt; HD test 2 -- my home & nbsp; [d_type] & gt; 0 & nbsp; [c_type] & gt; 29 & nbsp; [user_id] & gt; 50 & nbsp php paging problems (urgent)
The data read from the database is as follows:
Array
(
[P_id] => 8
[Title] => HD test 2 -- my home
[D_type] => 0
[C_type] => 29
[User_id] => 50
[Photo] => Array
(
Http://club.verygood.cn/images/200907/124730234366319.jpg
Http://club.verygood.cn/images/200907/1247302347826.jpg
Http://club.verygood.cn/images/200907/12473023511645.jpg
Http://club.verygood.cn/images/200907/124730235428109.jpg
[4] => http://club.verygood.cn/images/200907/124730235763130.jpg
Http://club.verygood.cn/images/200907/12473023620.jpg
)
[Top_times] => 0
[Views] => 39
[Favorite] => 0
[Brief] => HD test 2 -- my home
[Project_id] => 0
[Tags] =>
[Photo_check] => 1
[Clear] => 1
[Money] => 0
[Download_times] => 0
[Average] => 0
[Add_time] => 1247302371
[Img_url] => http://club.verygood.cn/images/200907/124730234366319.jpg
[Img_128] => http://club.verygood.cn/images/200907/124730234366319_128.jpg
[Img_512] => http://club.verygood.cn/images/200907/124730234366319_512.jpg
[Img_str] => http://club.verygood.cn/images/200907/124730234366319.jpg,http://club.verygood.cn/images/200907/1247302347826.jpg,http://club.verygood.cn/images/200907/12473023511645.jpg,http://club.verygood.cn/images/200907/124730235428109.jpg,http://club.verygood.cn/images/200907/124730235763130.jpg,http://club.verygood.cn/images/200907/12473023620.jpg
)
To display images on the page, the image Array is: [photo] => Array
(
Http://club.verygood.cn/images/200907/124730234366319.jpg
Http://club.verygood.cn/images/200907/1247302347826.jpg
Http://club.verygood.cn/images/200907/12473023511645.jpg
Http://club.verygood.cn/images/200907/124730235428109.jpg
[4] => http://club.verygood.cn/images/200907/124730235763130.jpg
Http://club.verygood.cn/images/200907/12473023620.jpg
)
Problem: to display an image on each page, the home page displays [0] => http://club.verygood.cn/images/200907/124730234366319.jpg
And so on: how to implement paging?
------ Solution --------------------
Using array paging, there are too many code, which looks strange.
Clearly, each page is displayed, so it is not good to use the url to pass the value, and then take the corresponding value for judgment, and use the array to separate the values one by one. it is not necessary to retrieve all the values.
------ Solution --------------------
Refer to some open-source paging functions.
------ Solution --------------------
Watch the php100 video.
------ Solution --------------------
Pass the value according to the URL,
Xxx. php? Page = 1 corresponds to [0]
Xxx. php? Page = 2 corresponds to [1]
.........
------ Solution --------------------
Right. let's take a look at the open source. Good dz