Here I'am using php array concept,I have a array in php just like $array=array('name1,name2');I want to convert this array into following format for some requirement $array=('name1','name2');
And please let me know,how to convert first array into second array format and also what is the difference between this two array format. Please help me...
This is what I have done so far
foreach($query->result_array() as $row) {
$galleries[]= $row["subjects"];
$ids = join("','",$galleries);
}
echo $pps="SELECT * FROM student_register
WHERE s_name IN ('$ids')";
I got output like this :
SELECT * FROM student_register
WHERE s_name IN ('english,malayalam,hindi')
Instead of above I want following output
SELECT * FROM student_register
WHERE s_name IN ('english','malayalam','hindi')