Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

push generates error

<?php
$arrFirst = array("liquor_type","varietal","bottle_region","distributor");
$arrLast = array("smith","jones","parker");

$arrFirst_text = array("wine_quantity","wine_price");
$arrLast_text = array("smith","jones","parker");

//$arr_mysql=array_push($arrFirst,$arrFirst_text);
$arr_mysql=array("liquor_type","varietal","bottle_region","distributor","wine_quantity","wine_price");

foreach ($arr_mysql as &$tablename) {
  echo '<br>'.$tablename;
}  

Open in new window


works

but when I use push
$arr_mysql=array_push($arrFirst,$arrFirst_text);

no output and warning
Warning: Invalid argument supplied for foreach() in C:\Users\Acer\Documents\NuSphere PhpED\Projects\noname162.php on line 11
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

array merge works

thanks