How do I perform multiple explode cutting and combination? $ a = 'youku $ tudou $ down'
$ B = 'Episode 1 $ abcd
Episode 1 $ abcd
Episode 2 $ abcd
Episode 3 $ abcd
Episode 4 $ abcd
Episode 5 $ abcd $ episode 1 $ abcd
Episode 1 $ abcd
Episode 2 $ abcd
Episode 3 $ abcd
Episode 4 $ abcd
Episode 5 $ abcd $ episode 1 $ abcd
Episode 1 $ abcd
Episode 2 $ abcd
Episode 3 $ abcd
Episode 4 $ abcd
Episode 5 $ abcd'
Yes $ split
Last $ or line feed segmentation
Finally, you need to get
Youku
Episode 1
Second Set
Episode 3
Episode 4
Episode 5
Tudou
Episode 1
Second Set
Episode 3
Episode 4
Episode 5
Down
Episode 1
Second Set
Episode 3
Episode 4
Episode 5
Reply to discussion (solution)
$ A = 'youku $ tudou $ down '; $ B = 'Episode 1 $ abcd episode 1 $ abcd episode 2 $ abcd episode 3 $ abcd episode 4 $ abcd episode 5 $ abcd $ episode 1 $ abcd episode 1 $ abcd episode 2 $ abcd episode 3 set $ abcd fourth set $ abcd fifth set $ abcd $ First set $ abcd first set $ abcd second set $ abcd third set $ abcd fourth set $ abcd fifth set $ abcd '; $ a = explode ('$', $ a); $ B = explode ('$', $ B ); foreach ($ a as $ I => $ r) {echo"
$ R\ N "; foreach (explode (" \ n ", $ B [$ I]) as $ v) {$ t = explode ('$ ', trim ($ v); echo "$ t [0] \ n ";}}
YoukuFirst set first set second set third set fourth set fifth
TudouFirst set first set second set third set fourth set fifth
DownFirst set first set second set third set fourth set fifth
Hyperlink output error
$ A = 'youku $ tudou $ down '; $ B = 'Episode 1 $ abcd episode 1 $ abcd episode 2 $ abcd episode 3 $ abcd episode 4 $ abcd episode 5 $ abcd $ episode 1 $ abcd episode 1 $ abcd episode 2 $ abcd episode 3 set $ abcd fourth set $ abcd fifth set $ abcd $ First set $ abcd first set $ abcd second set $ abcd third set $ abcd fourth set $ abcd fifth set $ abcd '; $ a = explode ('$', $ a); $ B = explode ('$', $ B ); foreach ($ a as $ I => $ r) {echo"
$ R\ N "; foreach (explode (" \ n ", $ B [$ I]) as $ v) {$ t = explode ('$ ', trim ($ v); echo "$ t [0] \ n ";}}
YoukuFirst set first set second set third set fourth set fifth
TudouFirst set first set second set third set fourth set fifth
DownFirst set first set second set third set fourth set fifth
Wrong? What's wrong?
I cannot always be born out of nothing, right?
The hyperlink should be
Youku
Authorization 1.html
1_2.html
Routing 3.html
"""'
Tudou
2_1.html
2_2.html
2_3.html
"""''
Down
3_1.html
3_2.html
3_3.html
"""
I don't know how to implement multiple loop outputs.
Wrong? What's wrong?
I cannot always be born out of nothing, right?
The page should be real and should be filled in the abcd location of your data
How can dynamic generation correspond to real pages?
* _ *. Html
(Here is the first batch of youku tudou down_(this is the unique id).html of each group.
In this case, the link name is incorrect. Can the hyperlink array be counted from 1 instead of 0?
$ A = 'youku $ tudou $ down '; $ B = 'Episode 1 $ abcd episode 1 $ abcd episode 2 $ abcd episode 3 $ abcd episode 4 $ abcd episode 5 $ abcd $ episode 6 $ abcd episode 7 $ abcd episode 8 $ ddddd ninth set $ abcd tenth set $ abcd 11th set $ abcd $ 12th set $ abcd 13th set $ abcd 14th set $ abcd 15th set $ abcd 16th set $ abcd 17th set $ efghijk '; $ a = explode ('$', $ a); $ B = explode ('$', $ B ); foreach ($ a as $ I => $ r) {echo"
$ R\ N "; foreach (explode (" \ n ", $ B [$ I]) as $ v => $ lala) {$ t = explode ('$ ', trim ($ v); echo "$ t [0] \ n ";}}
The page should be real and should be filled in the abcd location of your data
How can dynamic generation correspond to real pages?
$a = explode('$$$', $a);$b = explode('$$$', $b);foreach($a as $i=>$r) { echo "
$r\n"; foreach(explode("\n", $b[$i]) as $j=>$v) { $t = explode('$', trim($v)); printf("%s\n", $i+1, $j+1, $t[0]); }}
YoukuFirst set first set second set third set fourth set fifth
TudouFirst set first set second set third set fourth set fifth
DownFirst set first set second set third set fourth set fifth
But your data is supposed to be like this.
$ A = comment'; $ a = explode ('$', $ a); $ B = explode ('$', $ B ); foreach ($ a as $ I => $ r) {echo"
$ R\ N "; foreach (explode (" \ n ", $ B [$ I]) as $ v) {$ t = explode ('$ ', trim ($ v); echo "$ t [0] \ n ";}}
YoukuFirst set second set third set fourth set fifth set
TudouFirst set second set third set fourth set fifth set
DownFirst set second set third set fourth set fifth set
Thank you very much.
In fact, this is the stream playback address. abcd is the stream playback address, which must be used separately.