• 11-04-2009, 12:05:51
    #1
    örnek: $metin = http://localhost/sayfa.php?id=17;

    url den $_GET['id'] yaptığımız gibi $metin den id yi çekebilirmiyiz?
  • 11-04-2009, 12:36:03
    #2
    <?php
    	$metin = "http://localhost/sayfa.php?id=17";
    	preg_match("@id=([0-9]+)@i",$metin,$cikti);
    	echo $cikti['1'];
    ?>
    yanlis anlamadiysam böyle birsey soruyorsun
  • 11-04-2009, 13:04:59
    #3
    Üyeliği durduruldu
    $metin = http://localhost/sayfa.php?id=17;

    $metin de sadece url varsa

    önce parse_url()

    sonra parse_str()

    eğer http://localhost/asd..... asdas das as d gibi uzuyosa en kolay yukarıdaki mesajda verilen biçimde alırsın.

    kolay gelsin