Questions tagged as 'array'

1
answer

How to retrieve a specific information within this array?

I made a SQL query in the WordPress database that returned all the information regarding a request, however I need to store some of this information in variables and I do not know how to do it. $pid returns the ID of requests identif...
asked by 22.01.2016 / 21:06
1
answer

Send 10 values using the POST method, values must be entered in a [closed]

The goal is to send 10 values using the POST method through the form, and insert them into a vector, which will be printed later. Anyone can help me thank you right away.     
asked by 08.09.2017 / 01:00
1
answer

Traversing array and separating by commas [duplicate]

I have an array, and with var_dump it returns this: array (size=2) 0 => array (size=2) 'id' => int 18 'name' => string 'Drama' (length=5) 1 => array (size=2) 'id' => int 10765 'name' =&g...
asked by 30.07.2018 / 05:05
1
answer

laravel foreach view [closed]

I have this array and it can be infinite with several children link How do I make a foreach in this in a view?     
asked by 30.01.2018 / 13:20
2
answers

PHP - associative array: check the amount of elements inside a value (that has an array) of a key [closed]

I have an array like this: $array = array( user => "user1", name => "name1", books => "book1", "book2" ); I want to go into books and check the value that elements have inside it, in case it would be 2 (book1 and book2)...
asked by 03.09.2018 / 20:47
1
answer

How to transform this array into an array of 4 indexes?

Array ( [0] => Camaquã,Cavalhada,Cristal,Hípica ) I need to transform array up into an array of 4 indexes as seen below. Array ( [0] => Camaquã [1] => Cavalhada [2] => Cristal...
asked by 12.01.2016 / 02:50
1
answer

Order array in PHP for one key value (with fields with integer values) [duplicate]

I have a multidimensional array of type echo "<pre>"; print_r($order_info); exit(); Array ( [0] => Array ( [order_product_id] => 3227 [seller_id] => 27 ) [1] => Array...
asked by 20.11.2018 / 16:11
2
answers

What does this code do? I need a description of how it works [closed]

$links=array("Apache Server" =>"www.apague,org", "Apress" =>"www.appress.org", "PHP" =>"www.php.net"); echo "Links "; $cnt=0; foreach($links as $key => $value) { echo $value .' -$cnt <br/>'; $cnt++; } I need to know tha...
asked by 15.02.2016 / 17:26
1
answer

Vectors, pointers, and storage in memory [closed]

I need to solve an exercise where I need to use pointers, vectors and memory storage:    Create a vector with n elements, where each vector position   will match a pointer to a value of type float . Do it   read n values and store them...
asked by 21.12.2015 / 16:24
1
answer

Arrays in loops

I could not solve the following question: Fill in the blanks to print all elements of a array arr containing 3 elements: for(int x=0; x<___; x++){______<<______[x]<<endl;}     
asked by 16.05.2017 / 04:16