D-eye's Blog | Buitenzorg

Function array_merge()

Function array_merge()

Belajar tutorial php bahasa indonesia - Function array_merge()Function array_merge() berfungsi untuk menggabungkan dua atau lebih array .Syntax nya sebagai berikut :
array_merge(array1,array2,array3,dst);
Contoh 1 (menggunakan array numerik) :
1<?php
2$array1=array('nama','alamat','hobi');
3$array2=array('siapa','dimana','ngapain');
4$array3=array('deye','bogor','nyari kodok');
5$hasil=array_merge($array1,$array2,$array3);
6print_r($hasil);
7//hasil
8Array ( [0] => nama [1] => alamat [2] => hobi [3] => siapa [4] => dimana [5] => ngapain [6] => deye [7] => bogor [8] => nyari kodok )
9?>[code]
10Contoh 2 (menggunakan array assosiatif) :
11[code]<?php
12$array1=array('nama'=>'nimi','alamat'=>'ilimit','hobi'=>'hibi');
13$array2=array('siapa'=>'siipi','dimana'=>'dimini','ngapain'=>'ngipiin');
14$array3=array('deye'=>'diyi','bogor'=>'bigir','nyari kodok'=>'nyiri kidik');
15$hasil=array_merge($array1,$array2,$array3);
16print_r($hasil);
17//hasil
18Array ( [nama] => nimi [alamat] => ilimit [hobi] => hibi [siapa] => siipi [dimana] => dimini [ngapain] => ngipiin [deye] => diyi [bogor] => bigir [nyari kodok] => nyiri kidik )
19?>


Belajar tutorial php bahasa indonesia - Function array_merge()
Posted Posted: 09 Jun 2013 Author Author: D-eye
Views Views: 3190 Comments Comments: 54 comments
Categories Categories: belajar php
Tags Tags: function,array,tutorial,merge
Share Share: Twitter, Facebook, Reddit, Digg

Incoming search terms :

How to get Earning from website
How to get Earning from wapsite

Blog Title Comment
 

Write | View comments ( 54 )

  • Vitube Id's avatar#5795 Vitube Id
    ditungu php grab youtube nya
    26 Mar 2017 - 01:37
    108.162.246.139
    Reply
  • Agus Web's avatar#5790 Agus Web
    Bagi free cms om
    17 Mar 2017 - 16:22
    162.158.79.145
    Reply
  • Tobi's avatar#5777 Tobi
    [Quote by Video Grab] download video dari youtube...
    om gmn benerin tu bugs. trus gmn cara ngakalin bug ny
    15 Feb 2016 - 00:14
    8.37.234.3
    Reply
  • Video Grab's avatar#5776 Video Grab
    download video dari youtube
    10 Feb 2016 - 14:04
    107.167.112.18
    Reply
  • Tobi's avatar#5774 Tobi
    kunjungi waplirik.com ya
    07 Feb 2016 - 11:48
    8.37.234.3
    Reply

Write comment

Write comment in Function array_merge()
Name :

Email :

Website :

Comment :

Kode : 3j2


Bbcode ON | Smiley ON

Category

Belajar seo ( 11 )
Belajar mysql ( 8 )
Kontes ( 1 )
Belajar php ( 21 )
Php script ( 25 )
Dbs ( 29 )
Themes ( 6 )
Tips dan trick ( 14 )
Umum ( 25 )

Archive

Statistic

Online : 2
Hits : 2662/8468557
Hosts : 398/989397

Most commented