Ben burada biraz yardım seviniriz:
Ben ne yapmak istiyorum:
kaldırmak ve ItemsPerPage = 10:
http://localhost/thi/search/filter.html?type=featured&page=2&itemsperpage=10
ve ondan bir bağlantı oluşturun:
http://localhost/thi/search/filter.html?type=featured&page=2&itemsperpage=15
Burada şimdiye kadar gelip ne var:
<a href="<?php echo url::site(url::current()) . http_build_query($_GET) // don't know what follows ?>"
Ben kullanıyorum çerçeve işlevleri şunlardır:
url :: akımı () = denetleyicisi / eylem formatta mevcut url döndürür
url :: sitesi () döner = mutlak url yani http://localhost/site/controller/action
bu yüzden http_build_query işlevi sonuçlanan dizeden kaldırmak gerekir '& ItemsPerPage'
ama karakter kodlamaları ve bu ile sorun yaşıyorum! yardım lütfen!
işte karakter kodlaması ile sorun:
$needle = '&itemsperpage';
$querystring = http_build_query($_GET) . '<br/>';
// echo $querystring . '<br/>';
$pos = strpos($querystring, $needle);
$remove = substr($querystring, ((int)$pos));
echo substr(str_replace($remove, '', $querystring), 1); // returns ';'
I can't remove the string '&itemsperpage' from the result of http_build_query which is: 'type=featured&page=2&itemsperpage=10' and functions like strstr outputs nothing