Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions system/helpers/array_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,41 @@ function elements($items, $array, $default = FALSE)
}
}

// --------------------------------------------------------------------

/**
* Array to string - Join array elements with a string.
*
* @access public
* @param array
* @param string
* @param string
* @return string
*/
if ( ! function_exists('array_to_str'))
{
function array_to_str($array = array(), $sep = ', ', $sep_last = '')
{
if (empty($array) OR ! is_array($array))
{
return '';
}

if ($sep_last)
{
$last_element = array_pop($array);

if ( ! count($array))
{
return $last_element;
}

return implode($sep, $array).$sep_last.$last_element;
}

return implode($sep, $array);
}
}

/* End of file array_helper.php */
/* Location: ./system/helpers/array_helper.php */
4 changes: 2 additions & 2 deletions system/libraries/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class CI_Email {
public $bcc_batch_mode = FALSE; // TRUE/FALSE - Turns on/off Bcc batch feature
public $bcc_batch_size = 200; // If bcc_batch_mode = TRUE, sets max number of Bccs in each batch

protected $_safe_mode = FALSE;
protected $safe_mode = FALSE;
protected $_subject = '';
protected $_body = '';
protected $_finalbody = '';
Expand Down Expand Up @@ -1838,4 +1838,4 @@ protected function _mime_types($ext = '')
}

/* End of file Email.php */
/* Location: ./system/libraries/Email.php */
/* Location: ./system/libraries/Email.php */
Loading