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

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

PHP Functions

Function: strncmp

(PHP 4, PHP 5)

strncmp --  Binary safe string comparison of the first n characters

Description

int strncmp ( string str1, string str2, int len )

This function is similar to strcmp() , with the difference that you can specify the (upper limit of the) number of characters ( len ) from each string to be used in the comparison.

Returns < 0 if str1 is less than str2 ; > 0 if str1 is greater than str2 , and 0 if they are equal.

Note that this comparison is case sensitive.

Related Function(s)

  • strcmp()
  • ereg()
  • strncasecmp()
  • strcasecmp()
  • substr()
  • stristr()
  • strstr()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m