Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]preg_match_all
666
post
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 19.12.2008

Ostrzeżenie: (0%)
-----


Witam
Mam taki oto kod
CODE

<a href="http://domena.pl/index.php?option=com_registration&amp;task=lostPassword">
Lost Password?</a>

Chce wyciągnąć z niego tylko czyli to wszystko co jest za domena.pl a przed ">
CODE

index.php?option=com_registration&amp;task=lostPassword

Jak to zrobić napisałem coś takiego ale nie działa
  1. <?php
  2. preg_match_all('(<a href="http://?[^/]+(.+?)">Lost Password?</a>)', $ret, $match);
  3. $arr = $match[1];
  4. print_r($arr);
  5. ?>
Go to the top of the page
+Quote Post

Posty w temacie
- 666   [PHP]preg_match_all   18.04.2009, 14:59:54
- - dk1342   [PHP] pobierz, plaintext <?php$string = '<a ...   18.04.2009, 15:51:20
- - 1010   parse_url" title="Zobacz w manualu PHP" target="_m...   18.04.2009, 18:02:42
- - 666   Co do dk1342 to kod chodzi ale tylko jak jest na l...   18.04.2009, 19:47:05
- - zegarek84   Kod<?php preg_match_all('/<a href=...   19.04.2009, 07:56:13
- - 666   Działa dzięki   19.04.2009, 11:55:16


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.12.2025 - 23:37