W pawnie. : P
Znalazłem takie coś:
<?php
function add_or_change_parameter($parameter, $value) {
$output = "?";
$firstRun = true;
foreach($_GET as $key=>$val)
{
if($key != $parameter) {
if(!$firstRun) {
$output .= "&";
}
else {
$firstRun = false;
}
}
}
if(!$firstRun)
$output .= "&";
$parameter = $value;
}
?>
I ta funkcja wyświetlania:
<?php
$lines = file('pliczek.txt', FILE_SKIP_EMPTY_LINES
| FILE_IGNORE_NEW_LINES
); // for($i=0;$i<count($lines);$i++) Wyświetlanie wszystkich linii pokolei
switch($strona) {
case 1: {
for($s1=0;$s1<10;$s1++) {
echo '<p><div class="quotewrapper"><div class="quotecontent">'; }
break;
}
case 2: {
for($s2=10;$s2<count($lines);$s2++) {
echo '<p><div class="quotewrapper"><div class="quotecontent">'; }
break;
}
}
?>
<a href="
<?php echo add_or_change_parameter
("strona", "2"); ?>">Następna strona (2)</a><br /><br />
I jak przejdę i w adresie mam: ?strona=1 argument strona tak jakby nie działa (lol) : P Nic nie wyświetla z pliku (arg = 0?: D