我是一种将15个参数传递给url分页的方法:
例如我有:
$input = $_GET['input'];
$categories = $_GET['category'];
$state = $_GET['state'];
$zipcode = $_GET['zipcode'];
Run Code Online (Sandbox Code Playgroud)
我可以这样做,工作正常:
$paginate.= "<a href='$targetpage?page=$prev&input=".$_GET['input']."&
category=".$_GET['category']."&state=".$_GET['state']."&
zipcode=".$GET['zipcode']."'>Previous</a>";
Run Code Online (Sandbox Code Playgroud)
但是我要传递更多参数.有人能告诉我如何使用数组或其他更好的方法吗?
谢谢
我在这个论坛中找到了这个代码,我正在使用它.它的工作正常,但在法语中,月份是mois,所以它已经有了s.两个ss没有意义.
如果一个单词已经以一个单词结尾,如何阻止它插入?谢谢
function time_elapsed_string($ptime)
{
$etime = time() - $ptime;
if ($etime < 1)
{
return '0 seconds';
}
$a = array( 12 * 30 * 24 * 60 * 60 => 'an',
30 * 24 * 60 * 60 => 'mois',
24 * 60 * 60 => 'jour',
60 * 60 => 'heure',
60 => 'minute',
1 => 'seconde'
);
foreach ($a as $secs => $str)
{
$d = $etime / $secs;
if ($d >= 1)
{
$r = …Run Code Online (Sandbox Code Playgroud)