Page 1 of 1

convert array to string

Posted: Sat Mar 01, 2008 5:02 am
by jull
hey guys.. i have table named group and 2 fields id and groupname... i am selecting the groupname but i have this result
group: Array
this is my code

Code: Select all

        $groupName = $db->select("SELECT groupname FROM ".$glob['dbprefix']."CubeCart_group WHERE id = $group"); 
        $profile->assign("VAL_GROUP",$groupName);
how can i convert the array to string to see the group name

Re: convert array to string

Posted: Sat Mar 01, 2008 8:51 am
by Sekka
When you say to 'see' a group name, do you mean for debugging purposes? If so, do a print_r($variable) on the MySQL result as it will output the array to the screen.