Use implode
implode("|",$type);
More Related Contents:
- php implode (101) with quotes
- How to implode array with key and value without foreach in PHP
- Array Comparision with a string PHP
- Split a comma-delimited string into an array?
- Remove empty array elements
- Parse query string into an array
- Array to String PHP?
- Return single column from a multi-dimensional array
- How create an array from the output of an array printed with print_r?
- Convert backslash-delimited string into an associative array
- Convert a comma-delimited string into array of integers?
- String with array structure to Array [duplicate]
- Implode a column of values from a two dimensional array [duplicate]
- Transpose 2d array, join second level with commas, and join first level with pipes
- use strings to access (potentially large) multidimensional arrays
- How to split a long string without breaking words?
- String contains any items in an array (case insensitive)
- Convert a String into an Array of Characters
- Merge array items into string
- How to cast array elements to strings in PHP?
- PHP: Split string into array, like explode with no delimiter
- Search and replace multiple values with multiple/different values in PHP5?
- Explode string into array with no empty elements?
- Add a prefix to each item of a PHP array
- Fastest way of deleting a value in a comma separated list
- PHP get values from SimpleXMLElement array
- How to convert array values to lowercase in PHP?
- Convert a String to Variable
- Search and replace multiple values with multiple/different values in PHP?
- Check if string contains word in array [duplicate]