before that i upload values using implode(),after that i need display that array values.
below this code showing array values as in single variable.Click Here

see that page i added 5 categories but it displayed in single variable, i want to separate it, becaz that ids are different

        category:Pediatrician,ayurveda,skin Care,optical,yoga,
           Address  :   sgdrg 12 0

$place = $row['category_id'];
        $arr = array($place);
        foreach($arr as $place1) 
        echo $place1;

Recommended Answers

All 3 Replies

you can use explode if you want.

$this_category = explode(',' , $row['category_id']);

    foreach($this_category as $cat){
        echo $cat.'<br/>';

or if you want to become creative , you can do it like this

foreach((explode(',',$row['category_id'])) as $cat){

    echo $cat.'<br/>';


thanks but if i try this am getting last value only i could't get whole value

ya now it works thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.