convert array to string

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jull
Forum Newbie
Posts: 1
Joined: Sat Mar 01, 2008 4:55 am

convert array to string

Post 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
User avatar
Sekka
Forum Commoner
Posts: 91
Joined: Mon Feb 18, 2008 10:25 am
Location: Huddersfield, West Yorkshire, UK

Re: convert array to string

Post 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.
Post Reply