PHP string str_getcsv() Function4 Sept 2024 | 1 min read The str_getcsv() is in-built PHP string function. It is important function which is used to parse a CSV string into an array. Syntax:
![]() Example 1//Create 'data.csv' File Output: Note: If "data.csv" file is not found then it will return error.Example 2// create "data.csv" and save : ![]() //Save it: test.php Output: Array ( [0] => 101 [1] => Alok Nandan [2] => is [3] => Learning [4] => PHP [5] => from [6] => JavaTpoint ) Example 3Output: Array ( [0] => 1 [1] => PEN [2] => red ) Array ( [0] => 2 [1] => Book [2] => green ) Or Array ( [0] => 1 [1] => PEN [2] => red ) Array ( [0] => 2 [1] => Book [2] => green ) Next TopicPHP String |
PHP Hebrev() Function PHP is string function, which is used to convert Hebrew text from right to left or left to right visual text. Syntax: hebrev(string,maxcharline) ; Parameter Description Required/Optional string A Hebrew text. required maxcharline Specify maximum character for each line. optional Example 1 <?php echo hebrev("? ???? ?????"); ?> Output: ??????? ?????? ??? TopicPHP String ...
1 min read
PHP String Function The function is a built-in function of PHP which is used to convert an 8-bit string to a quoted-printable string. This function is opposite to the quoted_printable_decode(), and similar to the imap_8bit() function. It returns a quoted printable string that is created...
1 min read
PHP String Function The function is an in-built function of PHP, which converts pre-defined HTML entities to characters. It is opposite to the htmlspecialchars() function. HTML entities decoded back to the character will be like- &amp; converts as & (ampersand) &quot; converts as " (double-quote) &#039; converts as...
3 min read
PHP string Function The is in-built PHP function which is use to pad a string to a certain length. It returns input string padded on the left, right both sides to the specified function. Syntax: str_pad(string,length,pad_string,pad_type) Parameter Description Required/Optional String Specify the string. Required Length Specify the new string length. Required Pad_string Specify the string for padding. Optional Pad_type Specify what...
1 min read
PHP string Function PHP is predefined function which is used to remove whitespace or character form the right side of a string. Syntax: rtrim(string,charlist); Parameter Description Required/Optional string Specify the string to check. required charlist Specify character to remove Following character "\0" - NULL "\t" - tab "\n" - new line "\x0B" - vertical tab "\r" - carriage return " "...
1 min read
PHP Function The strops() is in-built function of PHP. It is used to find the position of the first occurrence of a string inside another string or substring in a string. Syntax: int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ); Parameter Description Required/Optional string Specify the...
2 min read
PHP Function PHP function is used to write a formatted string to a stream. In another words we can say that this function format string to a specified output stream( file or database). Syntax: fprintf(stream,format,arg1,arg2,arg++) Parameter Description Required/Optional stream Specify string where to write /output the string Required Format Specify the string. Required arg1 Specify the argument to...
2 min read
PHP string function The is in-built PHP function. It is used to perform the ROT12 encoding on string. This function encodes shifts every letter 13 place in the alphabet while numeric and non0alphabeticall characters remains untouched. Note: This function encodes or decodes the data by same function. Syntax: str_rot13(string); Parameter Description Required/Optional String Specify...
1 min read
PHP string md5_file() Function PHP string md5_file() function is in-built important function. It is used to calculate the MD5 hash of a file. It uses the RSA Data Security. It returns the md5 hash on success, or FALSE on failure. Syntax: md5_file(file,raw); Parameter Description Required/Optional File Specify the file to be calculated. Required Raw Specify the Boolean...
1 min read
PHP string Function PHP string_tags() is predefine string function of PHP. It is used to strip HTML and PHP tags from a string or strips a string from HTML, XML and PHP tags. Note 1: This function is binary safe. It return a string with all NULL...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India