Jump to content

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

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.