Hi all,

$a1 = $_POST["a"];
$servicec = addslashes(serialize($a1)); 

i used this code to store the check box values in db with comma seperated
it has stored like this....a:5:{i:0;s:18:"vehicle Inspection";i:1;s:14:"batteryservice";i:2;s:10:"oil canhge";} but while retrieving its displaying in the same manner
but i want dont want to display like this.....i want it to be displayed normally,,, what to do.......

Recommended Answers

All 4 Replies

hi,
use implod() function it will store check box values into database with comma separated

Hi all
what is the syntax of the implode fuction how to use it.....in my application

<?php

$array = array('lastname', 'email', 'phone');
$comma_separated = implode(",", $array);

echo $comma_separated; // lastname,email,phone

?>

Hi all
what is the syntax of the implode fuction how to use it.....in my application

php.net is the source for all php functions my friend. :)

Be a part of the DaniWeb community

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