if your having a field in your table which holds multiple values and you want to display the same.then use “spliti”
example:
company_dept is the field name.
$sql=”SELECT *from table_name”;
$ex=mysql_query($sql)
$result=mysql_fetch_array($ex);
$cmp_dept=$result['company_dept'];//when you echo this will display all the values
suppose you want single value then
$dept=spliti(”,”, $cmp_dept, 5);//this will split a string into array
$cnt=count($dept);//this will count the number of elements in the array
for output:print_r($dept)
or echo $dept[0];
spliti is case insensitive whereas split is not.
for more info visit:http://www.php.net/manual/en/function.spliti.php
