ich viele Links haben:PHP vergleichen mehrere String
http://exmpale.com/abc/exmpale.html
http://exmpale.com/abc/exmpale1.html
http://exmpale.com/abc/exmpale2.html
http://exmpale.com/abc/exmpale/exmpale1.html
http://exmpale.com/abc/exmpale/exmpale2.html
http://exmpale.com/abc/exmpale/exmpale3.html
http://exmpale.com/abcd/exmpale1.html
http://exmpale.com/abcd/exmpale2.html
http://exmpale.com/abcd/exmpale2.html
http://exmpale.com/abcd/exmpale4.html
http://exmpale.com/abc/abc/exmpale1.html
http://exmpale.com/abc/abc/exmpale2.html
http://exmpale.com/abc/abc/exmpale3.html
http://exmpale.com/abc/abc/exmpale4.html
http://exmpale.com/abc/abc/exmpale5.html
ich php, ich will alle Links wie http://exmpale.com/abc/(*).html
bekommen und es in Array-Liste. Es tut mir leid, ich habe Code vergessen. Code von mir
$a = array(
0 => 'http://exmpale.com/abc/exmpale.html',
1 => 'http://exmpale.com/abc/exmpale1.html',
2 => 'http://exmpale.com/abc/exmpale2.html',
3 => 'http://exmpale.com/abc/exmpale/exmpale1.html',
4 => 'http://exmpale.com/abc/exmpale/exmpale2.html',
5 => 'http://exmpale.com/abc/exmpale/exmpale3.html',
6 => 'http://exmpale.com/abcd/exmpale1.html',
7 => 'http://exmpale.com/abcd/exmpale2.html',
8 => 'http://exmpale.com/abcd/exmpale2.html',
9 => 'http://exmpale.com/abcd/exmpale4.html',
10 => 'http://exmpale.com/abc/abc/exmpale1.html',
11 => 'http://exmpale.com/abc/abc/exmpale2.html',
12 => 'http://exmpale.com/abc/abc/exmpale3.html',
13 => 'http://exmpale.com/abc/abc/exmpale4.html',
14 => 'http://exmpale.com/abc/abc/exmpale5.html',
);
foreach($a as $k => $v){
$abc = preg_match_all('/http\:\/\/exmpale\.com\/abc\/(.*?)\.html/',$v,$b);
print_r($b[1]);
}
und ich möchte das Ergebnis erhalten.
$result = array(
'http://exmpale.com/abc/exmpale.html',
'http://exmpale.com/abc/exmpale1.html',
'http://exmpale.com/abc/exmpale2.html');
aber es dauerte alles Ergebnis, bitte hilf mir dankt Ihnen.
Ich schlage vor, Sie werfen Sie einen Blick auf Loops und Teilstring-Funktionen. Fangen Sie an, in die Dokumentation zu schauen, fangen Sie an, Google dafür zu verwenden. Dann starte dein eigenes Skript, versuche es selbst zu lösen. _Then_, wenn Sie auf ein _specific_ Problem mit Ihrem eigenen Code stoßen, _then_ ist die Zeit, hier zu fragen und Ihren Code innerhalb der Frage zu veröffentlichen. Wir sind nicht hier, um deine Arbeit für dich zu tun. Wir sind hier, um Ihnen zu helfen, Ihre Arbeit zu erledigen. – arkascha
Entschuldigung, ich Frogot Code von mir – phuochq