Jump to content

[SOLVED] pagination from an array


adam291086

Recommended Posts

I have found a script here http://www.lotsofcode.com/php/php-array-pagination.htm and i am trying to implement it with my script and i am getting the error

 

Warning: array_slice() expects parameter 1 to be array, object given in /home/adamplo1/public_html/CASE/class/pagination/pagination.class.php on line 55

 

It has something to do with my array

Array

(

    [0] => Array

        (

            [0] => Array

                (

                    [idUser] => 1

                    [username] => adam

                    [password] => plowman

                    [title] => mr

                    [forename1] => lkjlk

                    [forename2] => jlkj

                    [surname] => lkj

                    [addressLine1] => lkj

                    [addressLine2] => lkjl

                    [town] => kjlk

                    [postcode] => jlk

                    [secondEmail] => jlk

                    [personalUrl] => lkjlkjlkjljlkk

                    [photo] =>

                    [female] => 1

                    [postcodeStart] => dsfdsfdsfd

                    [authorityToWorkStatement] => sdfdsfdsfs

                    [contactPreference] => Mobile

                    [EducationLevels_idEducationLevel] => 2

                    [noOfGcses] => 0

                    [gcseEnglishGrade] => a

                    [gcseMathsGrade] => a

                    [fiveOrMoreGcses] => 1

                    [noOfAlevels] => 9999

                    [ucasPoints] => 9999

                    [studentStatus] => Full-time

                    [mobile] => asdsad

                    [landline] => sadsad

                    [dob] =>

                    [penaltyPoints] => 3543

                )

 

        )

 

    [1] => Array

        (

            [0] => Array

                (

                    [idUser] => 17

                    [username] => sdfdsfr

                    [password] => erterte

                    [title] =>

                    [forename1] => ertret

                    [forename2] =>

                    [surname] => ertertreert

                    [addressLine1] =>

                    [addressLine2] =>

                    [town] =>

                    [postcode] =>

                    [secondEmail] =>

                    [personalUrl] =>

                    [photo] =>

                    [female] => 0

                    [postcodeStart] =>

                    [authorityToWorkStatement] =>

                    [contactPreference] => Mobile

                    [EducationLevels_idEducationLevel] =>

                    [noOfGcses] => 0

                    [gcseEnglishGrade] =>

                    [gcseMathsGrade] =>

                    [fiveOrMoreGcses] => 0

                    [noOfAlevels] => 0

                    [ucasPoints] => 0

                    [studentStatus] => Full-time

                    [mobile] =>

                    [landline] =>

                    [dob] =>

                    [penaltyPoints] =>

                )

 

        )

 

)

 

 

any help is appreciated

 

Link to comment
https://forums.phpfreaks.com/topic/150762-solved-pagination-from-an-array/
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.