Hello, I try now to learn arrays, my code: $sourcesnot = mysql_query("SELECT megavideo, novamov, videoweed, movshare, stagevu FROM pm_player_sources WHERE uniq_id = '".$uniqid."'"); while($row5 = mysql_fetch_assoc($sourcesnot)) { $id = $row5; foreach ($id as $k => $v ) { if ($v > 0){ $arr = array($v); var_dump($arr); } } } PHP: var_dump($arr) gives me this result: Now I have two arrays, but I need only one with 4 and 6
is that what u want ? <?php $sourcesnot = mysql_query("SELECT megavideo, novamov, videoweed, movshare, stagevu FROM pm_player_sources WHERE uniq_id = '".$uniqid."'"); $arr = array(); while($row5 = mysql_fetch_assoc($sourcesnot)) { foreach($row5 as $k => $v): $arr[][$k] = $v; endforeach; } var_dump($arr); ?> PHP: