Hi all,
I have the following function:
<?
function getcard($getcard) {
$db_name = "draw";
$connection = @mysql_connect("localhost", "root", "camcim74") or die("Cound not connect to database");
mysql_select_db($db_name, $connection) or die("Count not select database");
$query = "SELECT * FROM paint WHERE No = $getcard";
$q_result = mysql_query($query);
// Instantiate array
$arrResultSet = array();
// Retrieve all resulting rows and push to $arrResultSet
while ($rows = mysql_fetch_array($q_result)) {
array_push($arrResultSet, $rows);
}
return $arrResultSet;
}
?>
In my mySQL db i have a field called 'sloeve' in which i want to explode the results and put it in it's own array then put it into the $arrResultSet array.
This is what i am using to explode the results:
$sloeve_exp = explode('//,', $sloeve);
for ($i=0; $i<count($sloeve_exp); $i++){
echo $sloeve_exp[$i] . "<BR>";
echo "//,<BR>";
}
Can anyone give me pointers on how to achieve this?
Cheers,
micmac