Sure, this is what I got:
$makeknown = str_replace(" ", "', '", "$bbuserinfo[firstset]");
$makeknown = "'$makeknown'";
$findsecond = $DB_site->query_first("SELECT * FROM secondset WHERE id = '$bbuserinfo[secondselect]'");
$maketeach = str_replace(", ", "', '", "$findsecond[numbersets]");
$maketeach = "'$maketeach'";
$my_arry1 = $makeknown;
$my_arry2 = $maketeach;
for($i=0;$i<count($my_arry1);$i++) {
$fst = explode(":",$my_arry1[$i]);
for($j=0;$j<=count($my_arry2);$j++){
$snd = explode(":",$my_arry2[$j]);
if($fst[0] == $snd[0]){
if ($fst[1] >= 100){
$my_arry1[$i] = $fst[0].":".(100);
}else{
$my_arry1[$i] = $fst[0].":".(intval($fst[1])+intval($snd[1]));
}
array_splice($my_arry2, $j, 1);
}
}
}
$my_arry1 = array_merge($my_arry1,$my_arry2);
$comma_separated = implode(", ", $my_arry1);
print "Final set : ".$comma_separated."<br><br>";
echo "Known : $makeknown<br>Taught : $maketeach<br>";
k, and with the $my_arry1 = $makeknown;, I get this error:
Warning: First argument to array_splice() should be an array in /www.gamers-forums.com/vb/aaa.php on line 568
Also, I have the $makeknown and $maketeach added too, and they echo everything like this:
Final set : '1:100', '2:91', '15:12', '23:30', '53:100', '50:0', '91:2', '90:2', '75:100', '76:100', '77:100', '78:100', '79:100', '80:100', '81:100', '82:100', '83:100', '84:100', '85:100', '86:100', '87:100', '50:1', '15:2', '19:2', '23:2', '90:2', '91:2'
First Set: '1:100', '2:91', '15:12', '23:30', '53:100', '50:0', '91:2', '90:2', '75:100', '76:100', '77:100', '78:100', '79:100', '80:100', '81:100', '82:100', '83:100', '84:100', '85:100', '86:100', '87:100'
Second Set : '50:1', '15:2', '19:2', '23:2', '90:2', '91:2'
EDIT: Wow, what a mess to look at eh? Sorry about that 😉