join

(PHP 4, PHP 5, PHP 7)

joinAlias von implode()

Beschreibung

Diese Funktion ist ein Alias für: implode().

add a note add a note

User Contributed Notes 2 notes

up
11
A.Rafay Hingoro
2 years ago
<?php
   
//first example
   
$array = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10');   
    echo
join('<br>', $array);
   
   
//first example (result)
    /*
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    */
   
    //second example
   
$arr[] = '1a';
   
$arr[] = '2b';
   
$arr[] = '3c';
   
$arr[] = '4d';
   
$arr[] = '5e';
   
$arr[] = '6f';
   
$arr[] = '7g';
   
$arr[] = '8h';
   
$arr[] = '9i';
   
$arr[] = '10j';
   
    echo
join('<br>', $arr);
   
//second example (result)
    /*
    1a
    2b
    3c
    4d
    5e
    6f
    7g
    8h
    9i
    10j
    */
up
0
erdalceylan25 at gmail dot com
1 month ago
$instance = \ArrayJoin\Builder::newInstance()
     ->select("a.id", "a.nick", "b.item")
     ->from($users, "a")
     ->innerJoin($items, "b", new \ArrayJoin\On("a.id = b.user_id"))
     ->setFetchType(\ArrayJoin\Builder::FETCH_TYPE_ARRAY)
     ->offset(1)
     ->limit(2);
    
$instance->execute();

https://github.com/erdalceylan/array-join
To Top