Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function addOutput($output, $keep = true){
- $old_output = $this->action_out;
- if($old_output == "Platzhalter")
- $this->action_out = $output;
- else{
- $new_parts = explode("|", $output);
- $old_parts = explode("|", $old_output);
- $new_output = array();
- if($keep)
- $new_output[0] = $old_parts[0];
- else
- $new_output[0] = $new_parts[0];
- //header rausschneiden
- unset($old_parts[0]);
- //keys neu vergeben
- $ol = array_merge($old_parts);
- // offset -1 letztes paar $k => $v
- // added $x
- $x = array_slice($ol, -1, 1);
- // key = counter
- $c = array_keys($x);
- $nl = $new_parts[1];
- for($i = 0;$i <= $c;$i++){
- $new_output[] = $ol[$i];
- //array_fill($i+1, 1,$ol[$i]);
- if($i == $c)
- $new_output[] = $nl;
- }
- $this->action_out = implode("|", $new_output);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement