Top

PHP Code Snippets Tagged with string

  (4)  
Sort by 
This function will return the duration of the given time period in days, hours, minutes and seconds. secstostr(1234567) would return "14 days, 6 hours, 56 minutes, 7 seconds"
Tags: duration  length  seconds  string  text  time 
+ 0 likes
2 comment(s)    Score: 0.0    Platform: PHP    Posted by Daveoh on Mar 04, 2009
This is a very short and simple snippet that will take a given string, $string, and if it is plural the 's' will be removed from the $string.
Tags: plural  remove  string 
+ 0 likes
7 comment(s)    Score: 0.0    Platform: PHP    Posted by Hawkee on Jan 21, 2009
simple encryption example. output is the sum of 2 and the ascii value of each character. for example, below is listed a string of characters and their ascii value.
+ 2 likes
9 comment(s)    Score: 5.0    Platform: PHP    Posted by sean on Sep 08, 2008
This function extracts all alpha numeric letters and numbers from a string. Basically, it takes out everything that is not an alpha-numeric character, including spaces. This function is useful in..
Tags: string 
+ 0 likes
1 comment(s)    Score: 7.0    Platform: PHP    Posted by dohdoh on Aug 31, 2005
Bottom