Welcome Guest, Not a member yet? Register   Sign In
how to get string from database and how to explode it in codeigniter?
#1

(This post was last modified: 07-21-2018, 03:08 AM by jaydevvara.)

Here is my code i tried to explode string, but get some errors, i got string but i did not explode, Here i getting some erros,i cant understand it A PHP Error was encountered
Severity: Warning
Message: explode() expects parameter 2 to be string, object given
Filename: views/testing.php
Line Number: 65
Here is My code:

Code:
 <?php

                                   foreach ($test as $t)  
                               {
                                     echo  $user_rights=$t;
                                       $t=(explode(",", $t));                                  


                                   }

                                   ?>
Reply
#2

Is $test the DB query result?

In that case $t also needs database column - $t->user_rights
Reply
#3

(07-21-2018, 06:27 AM)Pertti Wrote: Is $test the DB query result?

In that case $t also needs database column - $t->user_rights

oh yes got it, Thank you
Reply
#4

(07-22-2018, 09:26 PM)jaydevvara Wrote: oh yes got it, Thank you

No worries Smile
Reply
#5

(07-23-2018, 12:28 AM)Pertti Wrote:
(07-22-2018, 09:26 PM)jaydevvara Wrote: oh yes got it, Thank you

No worries Smile
 just now i posted new question can you help me please?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB