ChrisB: aus string extrahieren, danke.

Beitrag lesen

Hi,

liegt es am String, der sieht wie folgt aus :
tandard.asp?ID=449781&SAID=449781&SUCH=&FROM=&refnr=123d45
wie  kann ich das Ende also 123d45 extrahieren ?

Für das Ausdröseln der URL gibt es parse_url(), das aber nicht mit relativen URLs arbeiten will.

Doch, das frisst so einiges.

Zitat Manual: "Partial URLs are also accepted, parse_url() tries its best to parse them correctly."

parse_str(  
  parse_url('tandard.asp?ID=449781&SAID=449781&SUCH=&FROM=&refnr=123d45', PHP_URL_QUERY),  
  $parameters  
);  
var_dump($parameters);

MfG ChrisB

--
„This is the author's opinion, not necessarily that of Starbucks.“