|
Posted by Klaus Brune on 10/06/06 21:42
In article <efmieh$1fj2$1@news.mtu.ru>, ashok@replyhere.com says...
> Hi,
> I need a function that will divide text from mysql in 2 parts, so that I
> can display first half in one column and second half in second column.
> I can't find what function will do this job.
It may or may not be overkill, depending on the complexity of the
delimiter and your split, but my first thought went to using preg_match
and assigning the $matches array. Then use sub-expressions (parenthesis)
to extract the parts you need. I use this all the time to, say, batch-
convert a a bunch of web pages for inclusion in a database, with header
field like metatag keywords and description extracted nicely.
Just give a shout here if you'd like to see some sample code, and I'll
see if I can hunt it down.
Later
GC
Navigation:
[Reply to this message]
|