CodeIgniter Forums

Full Version: how to get string from database and how to explode it in codeigniter?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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));                                  


                                   }

                                   ?>
Is $test the DB query result?

In that case $t also needs database column - $t->user_rights
(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
(07-22-2018, 09:26 PM)jaydevvara Wrote: [ -> ]oh yes got it, Thank you

No worries Smile
(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?