|
|
|
PHP: จะรวมข้อมูล Array 2 ตัวเข้ารวมกันด้วย PHP ต้องทำยังไง |
|
|
|
|
|
|
|
แนวคิดง่ายๆ(PHP)
<?php
$array1 = array("A","B","C","D");
$array2 = array("A","B","C","D");
$new_array = array();
foreach($array1 as $a1){
foreach($array2 as $a2){
$val = $a1.$a2;
array_push($new_array,$val);
echo $val." ";
}
echo "<br />";
}
//var_dump($new_array);
?>
|
|
|
|
|
Date :
2013-11-05 15:20:11 |
By :
mangkunzo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้แล้วครับ ขอบคุณครับ
|
|
|
|
|
Date :
2013-11-05 15:23:47 |
By :
mitchiketta |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|