Most Referenced Functions
  » google_pagerank()
  » preg_replace()
  » site_pageranks()
  » imagecreatefrompng()
  » htmlentities()
  » imagepng()
  » imagestring()
  » imagedestroy()
  » preg_match()
  » imagecolorallocate()
  » header()
  » fopen()
  » session_start()
  » getimagesize()
  » strpos()
  » strstr()
  » preg_match_all()
  » ob_start()
  » nl2br()
  » array2vars()
  » ob_flush()
  » str_replace()
  » flush()
  » htmlspecialchars()
  » setcookie()
  » urlencode()
  » ereg()
  » preg_split()
  » ereg_replace()
  » var_dump()

Our Sponsors
 » Weblog Community
 » Rock Music Community - meet fans
 » Furniture Stores Allentown

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m.

Local search Connecticut furniture stores can be found at FurnitureCatch: Furniture Stores Norwalk, Furniture Stores Stamford, Furniture Stores Greenwich, Furniture Stores New Canaan, Furniture Stores Darien
PHP Functions

Function: chunk_split

(PHP 3 >= 3.0.6, PHP 4, PHP 5)

chunk_split -- Split a string into smaller chunks

Description

string chunk_split ( string body [, int chunklen [, string end]] )

Can be used to split a string into smaller chunks which is useful for e.g. converting base64_encode() output to match RFC 2045 semantics. It inserts end (defaults to "\r\n") every chunklen characters (defaults to 76). It returns the new string leaving the original string untouched.

Example 1. chunk_split() example

<?php
// format $data using RFC 2045 semantics
$new_string = chunk_split(base64_encode($data));
?>

Related Function(s)

  • base64_encode()
  • str_split()
  • explode()
  • split()
  • wordwrap()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m