Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

php string split

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Advice on shared windows hosting  
Author Message
kreten1983

External


Since: Nov 21, 2003
Posts: 8



(Msg. 1) Posted: Sat Dec 20, 2003 4:15 pm
Post subject: php string split
Archived from groups: alt>www>webmaster (more info?)

how can i split some string using subsring as delimiter...


for example.. i have this string..


"werrerwerBLAHewtwertwertwBLAHwrewrwerwBLAHweioutizBLAH"



i want to use "BLAH" as delimiter so i can get this in array...


[0]=werrerwer
[1]=ewtwertwertw
[2]=wrewrwerw
[2]=weioutiz

 >> Stay informed about: php string split 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 2) Posted: Sun Dec 21, 2003 1:33 am
Post subject: Re: php string split [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post <news:bs1ec8$7du$1@bagan.srce.hr>
Platypus said:

 > how can i split some string using subsring as delimiter...

with big majics!

 > for example.. i have this string..
 >
 > "werrerwerBLAHewtwertwertwBLAHwrewrwerwBLAHweioutizBLAH"
 >
 > i want to use "BLAH" as delimiter so i can get this in array...
 >
 > [0]=werrerwer
 > [1]=ewtwertwertw
 > [2]=wrewrwerw
 > [2]=weioutiz

$string="werrerwerBLAHewtwertwertwBLAHwrewrwerwBLAHweioutizBLAH";

list($var[0],$var[1],$var[2],$var[3])=explode('BLAH',$string);

$countthingy=0;
while($countthingy<4){echo $var[$countthingy].'<br>';$countthingy++;}


--
brucie
20/December/2003 10:32:26 pm kilo<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: php string split 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 3) Posted: Sun Dec 21, 2003 2:00 am
Post subject: Re: php string split [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post <news:bs1fho$8k0oc$1@ID-117621.news.uni-berlin.de>
brucie said:

 > list($var[0],$var[1],$var[2],$var[3])=explode('BLAH',$string);

and heres another one: $var=explode('BLAH',$string);

--
brucie
20/December/2003 11:00:25 pm kilo<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: php string split 
Back to top
Login to vote
spambouncer

External


Since: Aug 16, 2003
Posts: 79



(Msg. 4) Posted: Sun Dec 21, 2003 2:01 am
Post subject: Re: php string split [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"brucie" <shit DeleteThis @bruciesusenetshit.info> wrote in message
news:bs1h5c$8g2bn$1@ID-117621.news.uni-berlin.de...
 > in post <news:bs1fho$8k0oc$1@ID-117621.news.uni-berlin.de>
 > brucie said:
 >
  > > list($var[0],$var[1],$var[2],$var[3])=explode('BLAH',$string);
 >
 > and heres another one: $var=explode('BLAH',$string);
 >


LOL,
.... and how about a regular expression in there

--
"Whatever happens, Scotland's squad will be concentrating on getting their
second leg over successfully tonight."
(BBC Radio 4)
<a style='text-decoration: underline;' href="http://www.private-eye.co.uk" target="_blank">http://www.private-eye.co.uk</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: php string split 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 5) Posted: Sun Dec 21, 2003 10:05 am
Post subject: Re: php string split [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post <news:bs2d50$90dq7$1@ID-177134.news.uni-berlin.de>
Makrobicz said:

 > LOL,
 > ... and how about a regular expression in there

what about 'fuck'? thats pretty regular


--
brucie
21/December/2003 07:02:36 am kilo<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: php string split 
Back to top
Login to vote
spambouncer

External


Since: Aug 16, 2003
Posts: 79



(Msg. 6) Posted: Sun Dec 21, 2003 11:10 am
Post subject: Re: php string split [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"brucie" <shit.TakeThisOut@bruciesusenetshit.info> wrote in message
news:bs2dig$8vn2u$1@ID-117621.news.uni-berlin.de...
 > in post <news:bs2d50$90dq7$1@ID-177134.news.uni-berlin.de>
 > Makrobicz said:
 >
  > > LOL,
  > > ... and how about a regular expression in there
 >
 > what about 'fuck'? thats pretty regular
 >

Perfect!

;o)


--
"Whatever happens, Scotland's squad will be concentrating on getting their
second leg over successfully tonight."
(BBC Radio 4)
<a style='text-decoration: underline;' href="http://www.private-eye.co.uk" target="_blank">http://www.private-eye.co.uk</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: php string split 
Back to top
Login to vote
www

External


Since: Jun 29, 2003
Posts: 720



(Msg. 7) Posted: Sun Dec 21, 2003 9:07 pm
Post subject: Re: php string split [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sat, 20 Dec 2003 20:57:58 -0000 "Makrobicz"
<spambouncer.DeleteThis@Makrobicz.com> broke off from drinking a cup of tea at
to write:

 >
 >
 >"brucie" <shit.DeleteThis@bruciesusenetshit.info> wrote in message
 >news:bs1h5c$8g2bn$1@ID-117621.news.uni-berlin.de...
  >> in post <news:bs1fho$8k0oc$1@ID-117621.news.uni-berlin.de>
  >> brucie said:
  >>
   >> > list($var[0],$var[1],$var[2],$var[3])=explode('BLAH',$string);
  >>
  >> and heres another one: $var=explode('BLAH',$string);
  >>
 >
 >
 >LOL,
 >... and how about a regular expression in there

Aaaaaaaaaaaagh!

I can not believe how powerful and convoluted Perl is. I thought C was
magnificent - it's still much faster than Perl - but Perl has such
powerful functionality.

Matt

--
A massive matrix of concise, interlinked encyclopaedia information.
For when you just want to know, quickly and easily.
<a style='text-decoration: underline;' href="http://www.probertencyclopaedia.com" target="_blank">http://www.probertencyclopaedia.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: php string split 
Back to top
Login to vote
lmergen

External


Since: Dec 14, 2003
Posts: 9



(Msg. 8) Posted: Mon Dec 22, 2003 12:16 am
Post subject: Re: php string split [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Matt Probert wrote:
 > Aaaaaaaaaaaagh!
 >
 > I can not believe how powerful and convoluted Perl is. I thought C was
 > magnificent - it's still much faster than Perl - but Perl has such
 > powerful functionality.

Ehrm, you *DO* know this is PHP eh ?

Grt,

Leon
<a style='text-decoration: underline;' href="http://www.solatis.com/" target="_blank">http://www.solatis.com/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: php string split 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Simple PHP ? - Match words in a string - This is a simple one. I have a string a few hundred characters long being fed to a php script. I want the script to break down the string into individual words, then check them for matches against a MySQL database. The final step is to print the..
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]