22 entries for "
string" as
partial match | search took 0.068 seconds
string handling | string in string | 22 matches
line 1: some functions to find strings inside other strings....
line 8: // checks for an occurance of a string...
line 9: // within another string...
line 10: function InStr($String,$Find,$CaseSensitive = false)...
line 13: while (strlen($String)>=$i)...
line 15: unset($substring);...
line 19: $String=strtolower($String);...
line 21: $substring=substr($String,$i,strlen($Find));...
line 22: if ($substring==$Find) return true;...
line 29: function InStrCount($String,$Find,$CaseSensitive = false)...
line 33: while (strlen($String)>=$i)...
line 35: unset($substring);...
line 39: $String=strtolower($String);...
line 41: $substring=substr($String,$i,strlen($Find));...
line 42: if ($substring==$Find) $x++;...
line 49: // the string. returns -1 if the string does not exist...
line 50: function InStrPos($String,$Find,$CaseSensitive = false)...
line 53: while (strlen($String)>=$i)...
line 55: unset($substring);...
line 59: $String=strtolower($String);...
line 61: $substring=substr($String,$i,strlen($Find));...
line 62: if ($substring==$Find) return $i;...
string handling | string replace | 15 matches
line 1: some useful functions to replace strings in strings...
line 7: // Multiple string replace...
line 8: // expects an array with $string => $replacement...
line 9: $old_string = 'file_example.txt<br>another_file.txt<br>phpexample.php<br>';...
line 11: $new_string = strtr($old_string,$replacements);...
line 12: echo $new_string;...
line 25: // String replacing, PHP...
line 26: $old_string = 'the qick brown fox jumped over the lazy dog.';...
line 27: $new_string = str_replace('qick brown fox', 'slow black bear', $old_string);...
line 28: echo $new_string;...
line 35: $source_string = '<b>bold</b> <a href="blank.php">link</a>';...
line 37: $replaced_string = preg_replace('[<.*?.>]', $replacement, $source_string);...
line 38: echo $replaced_string;...
line 43: $string = "The quick brown fox jumped over the lazy dog.";...
line 46: echo preg_replace($patterns, $replacements, $string);...
string handling | string to columns | 11 matches
line 17: if($_POST['string'])...
line 24: $stringlen = strlen($_POST['string']);...
line 25: $percolumn = ceil($stringlen/$columns);...
line 29: $string = stripcslashes(substr($_POST['string'],($percolumn*$x),$percolumn));...
line 30: $nextstring = stripcslashes(substr($_POST['string'],($percolumn*($x+1)),$percolumn));...
line 31: $nextpos = strpos(strtolower($nextstring),strtolower($seperator));...
line 32: $nextword = substr($nextstring,0,($nextpos+strlen($seperator)));...
line 33: $string = substr($string,$oldpos,$percolumn);...
line 34: $string = $string.$nextword;...
line 46: echo $string;...
line 60: <textarea name="string" cols="70" rows="20"></textarea><br />...
information | domaincheck | 7 matches
line 78: $string = '';...
line 81: $string .= fgets($fp,128);...
line 85: preg_match_all($reg, $string, $matches);...
line 91: $string = '';...
line 94: $string .= fgets($fp,128);...
line 98: if(ereg('(No match|No entries found|NOT FOUND|Not found)',$string))...
line 103: $whois = $string;...
sessions and co | sessions class | 7 matches
line 25: die('Function setvar( String $varname, mixed $value ) expects two parameters!');...
line 54: die('Function getvar( String $varname ) expects a parameter!');...
line 80: // Get a current session string (EXAMPLE: PHPSESSID=b188e8c9c45b347cdded2)...
line 81: // Syntax: $sid = $session->get_sid_string();...
line 82: // echo "$sid" to grab the string id. By default it uses PHPSESSID= variable...
line 84: function get_sid_string()...
string handling | insert at specific location | 4 matches
line 1: lets say you have a file where you want to insert a string into an existing file at a specific location...
line 25: $string .= $old_data[$x];...
line 27: $string .= $insert_key."\n".$new_data."\n";...
line 31: // write $string to file...
information | timestamp to time passed | 6 matches
line 17: if(round($weeks)) $timestring = round($weeks)." weeks ";...
line 18: if(round($days)) $timestring .= round($days)." days ";...
line 19: if(round($hours)) $timestring .= round($hours)." hours ";...
line 20: if(round($minutes)) $timestring .= round($minutes)." minutes ";...
line 21: if(!round($minutes)&&!round($hours)&&!round($days)) $timestring .= round($seconds)." seconds ";...
line 22: return $timestring;...
string handling | autolink | 3 matches
line 1: this script will detect URLs in a string and automatically create a link to this URL....
line 2: it removes the query-string and shows only the top-level of the site linked to as text....
line 8: $txt = '<p>this is a teststring with an url in it http://fundisom.com/phpsnippets/snip and its enough to be like that';...
string handling | substring examples | 2 matches
line 2: extracting the first, last, n chars of a string....
line 3: reverse a string or see how many times a char is used in a string....
file handling | write to first line of file | 2 matches
line 21: // make string out of array...
line 25: // write string to file...
image handling | base64 image encode | 2 matches
line 7: // returns the image as base64 encoded string...
line 19: // if you want to save the string to a file...
information | server variables | 2 matches
line 28: // output the string...
line 29: highlight_string($str);...
html and code | view php source | 1 match
line 39: highlight_string($newStr);...
directories | directory list with exec | 1 match
line 11: when you use the -l flag w/ ls, there will be a string of characters on the left for each file, which may look something like -rwxr-xr-x...
file handling | line by line | 1 match
line 21: // @return string the next line in the file....
file handling | write to file | 1 match
line 1: function to write a string to a file...
html and code | convert html | 1 match
line 1: strip html and javascript from string....
databases | mySQL to excel | 1 match
line 15: //as parameters in a query string, so that this code may be easily reused for...
image handling | resize offsite image | 1 match
line 33: $src = imagecreatefromstring ($data);...
string handling | string compare | 1 match
line 2: compares fields seperated by a pipe "|" to strings sent via POST variables...
file handling | open file | 1 match
line 1: opens a file and returns the content as a string...
html and code | floating div | 1 match
© 2008
phparadise |
go to the top27 hits by 21 users in the last 30 minutes.