Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Join array elements with a string
Alias join
<?php implode(string $separator, array $array): string
<?php         $reflector = new ReflectionClass($provider);

        $providerParts = explode('\\', $provider, -1);

        $namespace = implode('\\', $providerParts);



        $autoload = $package['autoload']['psr-4'][$namespace.'\\'];

        $directory = Str::removeRight(dirname($reflector->getFileName()), rtrim($autoload, '/'));
<?php         $parts = explode('/', $path);

        array_pop($parts);



        return implode('/', $parts);

    }
<?php         $url_array = explode('/', $url);

        array_pop($url_array);



        $url = implode('/', $url_array);



        return ($url == '') ? '/' : $url;

    }
<?php         $blueprint = str_replace('/', '.', $blueprint);

        $parts = explode('.', $blueprint);

        $handle = array_pop($parts);

        $namespace = implode('.', $parts);

        $namespace = empty($namespace) ? null : $namespace;



        return [$namespace, $handle];
<?php         foreach (Folder::disk('resources')->getFilesByTypeRecursively('templates', 'html') as $path) {

            $parts = explode('/', $path);

            array_shift($parts);

            $templates[] = Str::removeRight(implode('/', $parts), '.html');

        }



        return $templates;
<?php                 'display' => __('Handle'),

                'instructions' => __('statamic::messages.fields_handle_instructions'),

                'type' => 'text',

                'validate' => 'required|not_in:'.implode(',', $reserved),

                'width' => 50,

            ],

            'instructions' => [
<?php             }

        } elseif (

            is_string($value) &&

            preg_match('/\b('.implode('|', $sensitiveKeywords).')\b/', $this->camelToWords($name, false))

        ) {

            $value = str_repeat('•', strlen($value));

        }
<?php     {



        $params = implode(':', $params);

        $params = explode('|', $params);

        $groupBy = $params[0];
<?php         if (count($params) > 1) {

            $params = [implode('|', $params)];

        }



        return implode(Arr::get($params, 0, ', '), $value);
<?php             $params = [implode('|', $params)];

        }



        return implode(Arr::get($params, 0, ', '), $value);

    }
<?php         }



        if (count($params) > 1) {

            $params = [implode('|', $params)];

        }



        return implode(Arr::get($params, 0, '|'), $value);
<?php             $params = [implode('|', $params)];

        }



        return implode(Arr::get($params, 0, '|'), $value);

    }
<?php     public function rawurlencode($value)

    {

        return implode('/', array_map('rawurlencode', explode('/', $value)));

    }
<?php         if (method_exists($value, 'multisort')) {

            $value = $value->multisort(implode(':', $params));



            return $value->values();

        }
<?php     public function urlencode($value)

    {

        return implode('/', array_map('urlencode', explode('/', $value)));

    }