PHP Developers Network
http://forums.devnetwork.net/

Adding tabs
http://forums.devnetwork.net/viewtopic.php?f=38&t=34098
Page 1 of 1

Author:  MathewByrne [ Mon Jun 06, 2005 9:18 am ]
Post subject:  Adding tabs


Author:  Skara [ Mon Jun 06, 2005 11:31 am ]
Post subject: 

Syntax: [ Download ] [ Hide ]
preg_replace("/(^|\n)(.+?)/","$1\t$2",$string);


..I think. If that doesn't work, try this:

Syntax: [ Download ] [ Hide ]
preg_replace("/(^|\n)(.+?)(?!$)/","$1\t$2",$string);

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/