PHP/MySQL - How to save results to another array? -
im stuck in code. don't know how save result stored in array array. can me ? thank much.
php:
$sql_curr = mysql_query("select * tr_prices tr_code = '$acode'"); while($row = mysql_fetch_assoc($sql_cur)){ if($row['price'] != ''){ // there should array results if not empty column } } $arr_curr = array( //there should results previous array 'example' => 'example' );
$sql_curr = mysql_query("select * tr_prices tr_code = '$acode'"); $newarr=array();
while($row = mysql_fetch_assoc($sql_cur)){ if($row['price'] != ''){ $new_arr[]=$row; }
}
);
Comments
Post a Comment