faqts : Computers : Programming : Languages : PHP : kms : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

75 of 85 people (88%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

How can I use a tab character as the delimiter in split() or explode()?
How can I include a tab character in a string?

Jul 2nd, 1999 18:55
Nathan Wallace, Chuck Hagenbuch


The tab character is available using the \t sequence.  Remember that PHP
will not interpret strings that are in single quotes so you must use
double quotes for any string that contains a tab character.

Here is an example of the use of tab as a delimiter for explode():

    $foo = explode("\t", $array);