How can I accomplish this in php using a single variable? [duplicate] - php

This question already has answers here:
How can I merge multiple separate arrays that are not included in an array? [duplicate]
(2 answers)
Closed 9 years ago.
Ok , so I have a $unique_answer_title contains multiple arrays. Below is what I get when I use var_dump($unique_answer_title):
array(4) { [0]=> string(9) "Immediate" [1]=> string(3) "Yes" [2]=> string(29) "Have a representative call me" [3]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" } array(8) { [0]=> string(9) "Immediate" [1]=> string(3) "Yes" [2]=> string(29) "Have a representative call me" [3]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [4]=> string(9) "Immediate" [5]=> string(2) "No" [6]=> string(29) "Have a representative call me" [7]=> string(111) "Biomek<sup><em>‡‡</em></sup> NX<sup>P</sup> Workstation " } array(12) { [0]=> string(9) "Immediate" [1]=> string(3) "Yes" [2]=> string(29) "Have a representative call me" [3]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [4]=> string(9) "Immediate" [5]=> string(2) "No" [6]=> string(29) "Have a representative call me" [7]=> string(111) "Biomek<sup><em>‡‡</em></sup> NX<sup>P</sup> Workstation " [8]=> string(20) "Greater than 3 years" [9]=> string(3) "Yes" [10]=> string(42) "Have a representative contact me via email" [11]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" } array(18) { [0]=> string(9) "Immediate" [1]=> string(3) "Yes" [2]=> string(29) "Have a representative call me" [3]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [4]=> string(9) "Immediate" [5]=> string(2) "No" [6]=> string(29) "Have a representative call me" [7]=> string(111) "Biomek<sup><em>‡‡</em></sup> NX<sup>P</sup> Workstation " [8]=> string(20) "Greater than 3 years" [9]=> string(3) "Yes" [10]=> string(42) "Have a representative contact me via email" [11]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [12]=> string(9) "Immediate" [13]=> string(2) "No" [14]=> string(15) "Send literature" [15]=> string(77) "Sign me up for more info on the Biomek 4000<sup>†</sup>." [16]=> string(88) "Biomek<sup><em>‡‡</em></sup> Assay Workstation" [17]=> string(72) "SPRIworks Library Construction <sup>^^</sup>" } array(22) { [0]=> string(9) "Immediate" [1]=> string(3) "Yes" [2]=> string(29) "Have a representative call me" [3]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [4]=> string(9) "Immediate" [5]=> string(2) "No" [6]=> string(29) "Have a representative call me" [7]=> string(111) "Biomek<sup><em>‡‡</em></sup> NX<sup>P</sup> Workstation " [8]=> string(20) "Greater than 3 years" [9]=> string(3) "Yes" [10]=> string(42) "Have a representative contact me via email" [11]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [12]=> string(9) "Immediate" [13]=> string(2) "No" [14]=> string(15) "Send literature" [15]=> string(77) "Sign me up for more info on the Biomek 4000<sup>†</sup>." [16]=> string(88) "Biomek<sup><em>‡‡</em></sup> Assay Workstation" [17]=> string(72) "SPRIworks Library Construction <sup>^^</sup>" [18]=> string(9) "Immediate" [19]=> string(2) "No" [20]=> string(30) "Have a representative visit me" [21]=> string(77) "Sign me up for more info on the Biomek 4000<sup>†</sup>." } array(26) { [0]=> string(9) "Immediate" [1]=> string(3) "Yes" [2]=> string(29) "Have a representative call me" [3]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [4]=> string(9) "Immediate" [5]=> string(2) "No" [6]=> string(29) "Have a representative call me" [7]=> string(111) "Biomek<sup><em>‡‡</em></sup> NX<sup>P</sup> Workstation " [8]=> string(20) "Greater than 3 years" [9]=> string(3) "Yes" [10]=> string(42) "Have a representative contact me via email" [11]=> string(109) "Biomek<sup><em>‡‡</em></sup> FX<sup>P</sup> Workstation" [12]=> string(9) "Immediate" [13]=> string(2) "No" [14]=> string(15) "Send literature" [15]=> string(77) "Sign me up for more info on the Biomek 4000<sup>†</sup>." [16]=> string(88) "Biomek<sup><em>‡‡</em></sup> Assay Workstation" [17]=> string(72) "SPRIworks Library Construction <sup>^^</sup>" [18]=> string(9) "Immediate" [19]=> string(2) "No" [20]=> string(30) "Have a representative visit me" [21]=> string(77) "Sign me up for more info on the Biomek 4000<sup>†</sup>." [22]=> string(9) "Immediate" [23]=> string(2) "No" [24]=> string(5) "Other" [25]=> string(88) "Biomek<sup><em>‡‡</em></sup> Assay Workstation" }
How can I combine all the elements of these arrays shown below into one numerical array?
array_merge($unique_answer_title) doesn't seem to work ... and the variable $unique_answer_title itself is not an array, it's a group of multiple arrays. How can I get the elements of all these individual arrays together into one big array?

You need to merge the single arrays in a foreach loop.
$mergedArray = array();
foreach($unique_answer_title as $single){
$mergedArray = array_merge($mergedArray, $single);
}

Related

Wordpress admin submenu items array returns skipped value's

i returned a array off all my admin submenu items. but this returns like this:
array(2) { [0]=> string(4) "read" [10]=> string(11) "update_core" } array(0) { } array(4) { [5]=> string(10) "edit_posts" [10]=> string(10) "edit_posts" [15]=> string(17) "manage_categories" [16]=> string(16) "manage_post_tags" } array(3) { [5]=> string(12) "upload_files" [10]=> string(12) "upload_files" [15]=> string(17) "manage_categories" } array(2) { [5]=> string(10) "edit_pages" [10]=> string(10) "edit_pages" } array(0) { } array(4) { [5]=> string(10) "edit_posts" [10]=> string(10) "edit_posts" [15]=> string(17) "manage_categories" [16]=> string(17) "manage_categories" } array(3) { [5]=> string(10) "edit_posts" [10]=> string(10) "edit_posts" [15]=> string(17) "manage_categories" } array(0) { } array(8) { [0]=> string(18) "edit_theme_options" [1]=> string(19) "edit_us_page_blocks" [2]=> string(19) "edit_us_page_blocks" [3]=> string(19) "edit_us_page_blocks" [4]=> string(19) "edit_us_page_blocks" [5]=> string(14) "manage_options" [6]=> string(14) "manage_options" [7]=> string(14) "manage_options" } array(4) { [5]=> string(13) "switch_themes" [6]=> string(9) "customize" [7]=> string(18) "edit_theme_options" [10]=> string(18) "edit_theme_options" } array(2) { [5]=> string(16) "activate_plugins" [10]=> string(15) "install_plugins" } array(3) { [5]=> string(10) "list_users" [10]=> string(12) "create_users" [15]=> string(4) "read" } array(7) { [5]=> string(10) "edit_posts" [10]=> string(6) "import" [15]=> string(6) "export" [20]=> string(23) "view_site_health_checks" [25]=> string(27) "export_others_personal_data" [30]=> string(26) "erase_others_personal_data" [50]=> string(13) "setup_network" } array(5) { [0]=> string(14) "manage_options" [1]=> string(14) "manage_options" [2]=> string(14) "manage_options" [3]=> string(14) "manage_options" [5]=> string(10) "edit_posts" } array(7) { [10]=> string(14) "manage_options" [15]=> string(14) "manage_options" [20]=> string(14) "manage_options" [25]=> string(14) "manage_options" [30]=> string(14) "manage_options" [40]=> string(14) "manage_options" [45]=> string(22) "manage_privacy_options" } array(3) { [0]=> string(14) "manage_options" [1]=> string(14) "manage_options" [2]=> string(14) "manage_options" } array(0) { } array(0) { } array(2) { [0]=> string(14) "manage_options" [1]=> string(4) "read" }
php code:
$subMenuItems = wp_list_pluck($submenu_list, 1);
var_dump($subMenuItems);
i know this array is long, is it me or is this broken
i hope that someone can explain why the array items are not like [0] => .... [1] => .... but random
According to the documentation:
wp_list_pluck( array $list, int|string $field, int|string $index_key = null ): array
Array of found values. If $index_key is set, an array of found values with keys corresponding to $index_key. If $index_key is null, array keys from the original $list will be preserved in the results.
You need to add a third parameter, if you want to conserve indexed keys order.
Regards,

PHP session saving array with POST values

First sorry for my English.
I have a weird problem using the php $_SESSION Object.
I spent 2 days without find the solution.
I am triying to save a multidimensional array that stores some post values.
I create an array with this values and then i create a multidimensional array containing this arrays.
Page 1 (setvalues in multi array ans save in session)-> GET -> Page 2 read the session.
My code Page 1:
First, save the post values into a object property and validate them.
public function validateData(){
$this->nombres=$_POST["nombre"];
$this->imp_nombres=$_POST["imp_nombre"];
$this->numeros=$_POST["numero"];
$this->imp_numeros=$_POST["imp_numero"];
$this->tallas=$_POST["talla"];
$this->cantidades=$_POST["cantidad"];
$this->productos=$_POST["products"];
$this->equipos=$_POST["equipo"];
if(WSI_Funtions::compareSizes($this->nombres,$this->imp_nombres,$this->numeros,$this->imp_numeros,$this->tallas,$this->cantidades,$this->productos,$this->equipos))
{
$this->isValidModel=true;
$this->saveProductsValues();
}
else{
$this->isValidModel=false;
$this->errorMessage="Los datos no son correctos. Los parametros no coinciden";
}
}
If data is ok, I save those values:
public function saveProductsValues()
{
$this->productsValues=array();
$this->productsValues["names"]=$this->nombres;
$this->productsValues["imp_nombres"]=$this->imp_nombres;
$this->productsValues["numeros"]=$this->numeros;
$this->productsValues["imp_numeros"]=$this->imp_numeros;
$this->productsValues["tallas"]=$this->tallas;
$this->productsValues["cantidades"]=$this->cantidades;
$this->productsValues["productos"]=$this->productos;
$this->productsValues["equipos"]=$this->equipos;
}
Then I save it in a session :
public function saveSessionValues()
{
$_SESSION['customer'] = $this->customerObject;
$_SESSION['productsValues'] =$this->productsValues;
echo var_dump($_SESSION['productsValues']);
}
The saveSessionValues echo print this:
array(8) { ["names"]=> array(12) { [0]=> string(0) "" [1]=> string(12) "ÁNGEL HDEZ." [2]=> string(11) "VUJASINOVIC" [3]=> string(4) "ABIA" [4]=> string(10) "MUTAKABBIR" [5]=> string(8) "PETROVIC" [6]=> string(5) "DOBOS" [7]=> string(4) "HOMS" [8]=> string(6) "CASTRO" [9]=> string(0) "" [10]=> string(0) "" [11]=> string(0) "" } ["imp_nombres"]=> array(12) { [0]=> string(0) "" [1]=> string(1) "1" [2]=> string(1) "1" [3]=> string(1) "1" [4]=> string(1) "1" [5]=> string(1) "1" [6]=> string(1) "1" [7]=> string(1) "1" [8]=> string(1) "1" [9]=> string(0) "" [10]=> string(0) "" [11]=> string(0) "" } ["numeros"]=> array(12) { [0]=> string(1) "7" [1]=> string(1) "8" [2]=> string(1) "9" [3]=> string(0) "" [4]=> string(2) "11" [5]=> string(2) "12" [6]=> string(2) "18" [7]=> string(2) "19" [8]=> string(2) "22" [9]=> string(1) "5" [10]=> string(2) "33" [11]=> string(0) "" } ["imp_numeros"]=> array(12) { [0]=> string(1) "1" [1]=> string(1) "1" [2]=> string(1) "1" [3]=> string(0) "" [4]=> string(1) "1" [5]=> string(1) "1" [6]=> string(1) "1" [7]=> string(1) "1" [8]=> string(1) "1" [9]=> string(1) "1" [10]=> string(1) "1" [11]=> string(0) "" } ["tallas"]=> array(12) { [0]=> string(4) "XXXL" [1]=> string(3) "XXL" [2]=> string(2) "XL" [3]=> string(3) "XXL" [4]=> string(3) "XXL" [5]=> string(3) "XXL" [6]=> string(4) "XXXL" [7]=> string(3) "XXL" [8]=> string(2) "XL" [9]=> string(4) "XXXL" [10]=> string(2) "XL" [11]=> string(3) "XXL" } ["cantidades"]=> array(12) { [0]=> string(1) "1" [1]=> string(1) "1" [2]=> string(1) "1" [3]=> string(1) "1" [4]=> string(3) "145" [5]=> string(1) "1" [6]=> string(1) "1" [7]=> string(1) "1" [8]=> string(1) "1" [9]=> string(1) "1" [10]=> string(1) "1" [11]=> string(1) "1" } ["productos"]=> array(12) { [0]=> string(3) "109" [1]=> string(3) "109" [2]=> string(3) "109" [3]=> string(3) "109" [4]=> string(3) "109" [5]=> string(3) "109" [6]=> string(3) "109" [7]=> string(3) "109" [8]=> string(3) "109" [9]=> string(3) "109" [10]=> string(3) "109" [11]=> string(3) "109" } ["equipos"]=> array(12) { [0]=> string(7) "LEB ORO" [1]=> string(7) "LEB ORO" [2]=> string(7) "LEB ORO" [3]=> string(7) "LEB ORO" [4]=> string(7) "LEB ORO" [5]=> string(7) "LEB ORO" [6]=> string(12) "ES TALLA 4XL" [7]=> string(7) "LEB ORO" [8]=> string(7) "LEB ORO" [9]=> string(12) "ES TALLA 4XL" [10]=> string(7) "LEB ORO" [11]=> string(7) "LEB ORO" } }
My code Page 2 (php tags ommitted):
if (!isset($_SESSION)) { session_start(); }
echo var_dump($_SESSION['productsValues']);
This echo print the next value:
array(8) { ["names"]=> NULL ["imp_nombres"]=> NULL ["numeros"]=> NULL ["imp_numeros"]=> NULL ["tallas"]=> NULL ["cantidades"]=> NULL ["productos"]=> NULL ["equipos"]=> NULL }
The first level array exists, because the subarrays keys are printed, but all the second level arrays are NULL..
Maybe is for use the $_POST value??
I had try to encode the values of the $_POST object, saving only a json string instead of saving a object with the same result, the first nodes in the JSON are the keys of the arrays but the values are "NULL"
Any help please??
Thanks!!
You are over writing the values. Try with -
$_SESSION['productsValues'][] = $this->productsValues;

How to read var_dump in order to know how to load its variable contents in to an array with a foreach?

Here is a sample var_dump. Now, how do I know how to construct a foreach from it to load any particular word or fragment in to an array?
object(stdClass)#1 (2)
{
["noun"]=>
object(stdClass)#2 (1)
{
["syn"]=> array(24)
{
[0]=> string(12) "domestic dog"
[1]=> string(16) "Canis familiaris"
[2]=> string(5) "frump"
[3]=> string(3) "cad"
[4]=> string(7) "bounder"
[5]=> string(10) "blackguard"
[6]=> string(5) "hound"
[7]=> string(4) "heel"
[8]=> string(5) "frank"
[9]=> string(11) "frankfurter"
[10]=> string(6) "hotdog"
[11]=> string(7) "hot dog"
[12]=> string(6) "wiener"
[13]=> string(11) "wienerwurst"
[14]=> string(6) "weenie"
[15]=> string(4) "pawl"
[16]=> string(6) "detent"
[17]=> string(5) "click"
[18]=> string(7) "andiron"
[19]=> string(7) "firedog"
[20]=> string(8) "dog-iron"
[21]=> string(8) "blighter"
[22]=> string(5) "canid"
[23]=> string(6) "canine"
[24]=> string(5) "catch"
}
}
}
Before we can decipher it, we have to format it.
Tobias Kun's answer shows a very good way to format the var_dump output so you can read it.
object(stdClass)#1 (2)
{
["noun"]=>
object(stdClass)#2 (1)
{
["syn"]=> array(24)
{
[0]=> string(12) "domestic dog"
[1]=> string(16) "Canis familiaris"
[2]=> string(5) "frump"
[3]=> string(3) "cad"
[4]=> string(7) "bounder"
[5]=> string(10) "blackguard"
[6]=> string(5) "hound"
[7]=> string(4) "heel"
[8]=> string(5) "frank"
[9]=> string(11) "frankfurter"
[10]=> string(6) "hotdog"
[11]=> string(7) "hot dog"
[12]=> string(6) "wiener"
[13]=> string(11) "wienerwurst"
[14]=> string(6) "weenie"
[15]=> string(4) "pawl"
[16]=> string(6) "detent"
[17]=> string(5) "click"
[18]=> string(7) "andiron"
[19]=> string(7) "firedog"
[20]=> string(8) "dog-iron"
[21]=> string(8) "blighter"
[22]=> string(5) "canid"
[23]=> string(6) "canine"
[24]=> string(5) "catch"
}
}
}
You have a stdClass object with a property called ,"noun". noun is an abject with a property called "syn", which is an array of strings.
Suppose we call the object $object. Then we can access the array like:
echo $object->noun->syn[23];
which gives us canine. So a loop might look like:
foreach($data->noun->syn as $value) {
echo $value . "<br>\n";
}
First of all you should really increase the quality of your questions. The code is not formatted at all.
If you use echo "<pre>" . print_r($your_data_object_or_array,1) . "</pre>" your data will be formatted fine.
If i understand you right this should help you:
foreach($data['noun']['syn'] as $value) {
//with this you loop through all your words in "syn" e.g. domestic, "Canis familiaris etc."
echo $value . "<br>";
}
//Ouput:
domestic
Canis familiaris
frump
cad
etc ...

Php array: How can I echo the value of this? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I am trying to echo a setting on the second level of an array in my wordpress options and having some trouble getting the variable. This code DOES work:
<?php foreach($area['fields'] as $field): ?>
<?php if ($field['id'] == 'show_border')
{echo ' show_border';} ?>
<?php endforeach; ?>
That simply checks if there is a field that asks if you want to show a border and if there is it echos whatever I want, regardless of what the field is set at for actually showing the border or not.
What I am trying to do is to just echo the value that is set in the field "show_border".
Any idea how I would do this?
edit
array(11) {
[0]=>
array(3) {
["name"]=>
string(10) "# of posts"
["id"]=>
string(5) "posts"
["type"]=>
string(4) "text"
}
[1]=>
array(5) {
["name"]=>
string(13) "posts per row"
["id"]=>
string(13) "posts_per_row"
["type"]=>
string(6) "select"
["default"]=>
int(3)
["options"]=>
array(8) {
[1]=>
int(1)
[2]=>
int(2)
[3]=>
int(3)
[4]=>
int(4)
[5]=>
int(5)
[6]=>
int(6)
[7]=>
int(7)
[8]=>
int(8)
}
}
[2]=>
array(5) {
["name"]=>
string(11) "header type"
["id"]=>
string(13) "f_header_type"
["type"]=>
string(6) "select"
["default"]=>
string(2) "h4"
["options"]=>
array(6) {
["h1"]=>
string(2) "h1"
["h2"]=>
string(2) "h2"
["h3"]=>
string(2) "h3"
["h4"]=>
string(2) "h4"
["h5"]=>
string(2) "h5"
["h6"]=>
string(2) "h6"
}
}
[3]=>
array(5) {
["name"]=>
string(5) "icon?"
["id"]=>
string(9) "show_icon"
["type"]=>
string(5) "radio"
["default"]=>
string(3) "yes"
["options"]=>
array(2) {
["yes"]=>
string(3) "yes"
["no"]=>
string(2) "no"
}
}
[4]=>
array(5) {
["name"]=>
string(13) "icon location"
["id"]=>
string(13) "icon_location"
["type"]=>
string(6) "select"
["default"]=>
string(4) "left"
["options"]=>
array(3) {
["left"]=>
string(4) "left"
["right"]=>
string(5) "right"
["top"]=>
string(3) "top"
}
}
[5]=>
array(5) {
["name"]=>
string(10) "show text?"
["id"]=>
string(9) "show_text"
["type"]=>
string(5) "radio"
["default"]=>
string(3) "yes"
["options"]=>
array(2) {
["yes"]=>
string(3) "yes"
["no"]=>
string(2) "no"
}
}
[6]=>
array(5) {
["name"]=>
string(12) "show border?"
["id"]=>
string(11) "show_border"
["type"]=>
string(5) "radio"
["default"]=>
string(2) "no"
["options"]=>
array(3) {
["top"]=>
string(3) "top"
["bot"]=>
string(3) "bot"
["no"]=>
string(2) "no"
}
}
[7]=>
array(5) {
["name"]=>
string(8) "category"
["id"]=>
string(8) "category"
["type"]=>
string(6) "select"
["multiple"]=>
bool(true)
["options"]=>
array(2) {
[4]=>
string(7) "feature"
[3]=>
string(6) "slider"
}
}
[8]=>
array(4) {
["name"]=>
string(14) "custom classes"
["id"]=>
string(14) "custom_classes"
["type"]=>
string(4) "text"
["default"]=>
string(0) ""
}
[9]=>
array(5) {
["name"]=>
string(10) "read more?"
["id"]=>
string(9) "read_more"
["type"]=>
string(5) "radio"
["default"]=>
string(3) "yes"
["options"]=>
array(2) {
["yes"]=>
string(3) "yes"
["no"]=>
string(2) "no"
}
}
[10]=>
array(4) {
["name"]=>
string(14) "read more text"
["id"]=>
string(14) "read_more_text"
["type"]=>
string(4) "text"
["default"]=>
string(16) "Continue reading"
}
}
I am trying to get a value like ["id"]=> "show_border" and echo it's value.
Basically you can't get the form value in PHP which you're going to select from the form which was already loaded on the server-side.
It's like going from the future to the past.
You should use Javascript code + AJAX, instead of PHP, but it'll be much more complex.
Without knowing the full source of the site, it's not possible to tell you in one simple answer.
Also it depends on your development skills.

Google Analytics doesnt track any data

i am working on a custom Google Analytics implementation making use of direct utm.gif requests.
The problem:
Google Analytics doesnt track any data. Maybe because sth. is wrong with the parameters?
Thank's for helping
Sample: trackPage parameters
array(16) {
[0]=>
string(53) "http://www.google-analytics.com/__utm.gif?utmwv=4.5.7"
[1]=>
string(14) "utmn=474288553"
[2]=>
string(34) "utmhn=labs.domain.de%2Fphp%2Fga%2F"
[3]=>
string(16) "utmcs=ISO-8859-1"
[4]=>
string(11) "utmul=de-de"
[5]=>
string(7) "utmsr=-"
[6]=>
string(7) "utmsc=-"
[7]=>
string(7) "utmje=-"
[8]=>
string(7) "utmfl=-"
[9]=>
string(6) "utmr=-"
[10]=>
string(70) "utme=8%28userstatus%2Amyvariable%299%28nofan%2Amyvalue%2911%281%2A1%29"
[11]=>
string(14) "utmdt=Homepage"
[12]=>
string(16) "utmhid=441842675"
[13]=>
string(12) "utmp=home%2F"
[14]=>
string(17) "utmac=UA-123456-1"
[15]=>
string(191) "utmcc=__utma%253D186215409.1789216404.1265552708.1288611723.1288619999.26%253B%252B__utmz%253D186215409.1288619999.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%253B"
}
Sample: trackEvent parameters
array(15) {
[0]=>
string(53) "http://www.google-analytics.com/__utm.gif?utmwv=4.5.7"
[1]=>
string(14) "utmn=240340321"
[2]=>
string(34) "utmhn=labs.domain.de%2Fphp%2Fga%2F"
[3]=>
string(10) "utmt=event"
[4]=>
string(16) "utmcs=ISO-8859-1"
[5]=>
string(11) "utmul=de-de"
[6]=>
string(7) "utmsr=-"
[7]=>
string(7) "utmsc=-"
[8]=>
string(7) "utmje=-"
[9]=>
string(7) "utmfl=-"
[10]=>
string(6) "utmr=-"
[11]=>
string(116) "utme=5%28permission%2Apublish_stream%2Agranted%29%281%298%28userstatus%2Amyvariable%299%28%2Amyvalue%2911%281%2A1%29"
[12]=>
string(16) "utmhid=364249414"
[13]=>
string(17) "utmac=UA-123456-1"
[14]=>
string(191) "utmcc=__utma%253D186215409.1789216404.1265552708.1288611723.1288620331.26%253B%252B__utmz%253D186215409.1288620331.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%253B"
}
This one is generated with another lib and it's working. But i can't find my fault?
array(14) {
[0]=>
string(53) "http://www.google-analytics.com/__utm.gif?utmwv=4.5.7"
[1]=>
string(15) "utmn=8893029624"
[2]=>
string(18) "utmhn=labs.domain.de%2Fphp%2Fga%2F"
[3]=>
string(7) "utmcs=-"
[4]=>
string(7) "utmsr=-"
[5]=>
string(7) "utmsc=-"
[6]=>
string(11) "utmul=de-de"
[7]=>
string(7) "utmje=-"
[8]=>
string(7) "utmfl=-"
[9]=>
string(14) "utmdt=Homepage"
[10]=>
string(6) "utmr=-"
[11]=>
string(10) "utmp=/home"
[12]=>
string(17) "utmac=UA-123456-1"
[13]=>
string(199) "utmcc=__utma%3D155417661.238248693.1267644354.1279870281.1279921084.8%3B%2B__utmz%3D155417661.1279824753.5.6.utmccn=(organic)%7Cutmcsr=google%7Cutmctr=facebook%20goole%20analytics%7Cutmcmd=organic%3B"
}

Categories