Note that there are some explanatory texts on larger screens.

plurals
  1. PO(PHP) values of an array - recursion
    primarykey
    data
    text
    <p>After hours going around in circles I gave up and ask for help.</p> <p>I have an array which looks like:</p> <pre><code>[field01] =&gt; Array ( [name] =&gt; test01 [prefix] =&gt; C01 ) [field02] =&gt; Array ( [url] =&gt; http://www.url.com [user] =&gt; a_user [password] =&gt; a_password ) [filed03] =&gt; Array ( [0] =&gt; Array ( [id] =&gt; 1 [Type] =&gt; standard [Name] =&gt; name ) [1] =&gt; Array ( [id] =&gt; 5 [Type] =&gt; standard [Name] =&gt; name ) ) </code></pre> <p>Now I want to go through that array and get the following output as a return from a recursive function:</p> <pre><code>Array ( [0] = "The values of field01: name, prefix - test01, C01" [1] = "The values of field02: url, user, password - http://www.url.com, a_user, a_password" [2] = "The values of field03: id, Type, Name - 1, standard, name" [3] = "The values of field03: id, Type, Name - 5, standard, name" ) </code></pre> <p>I have tried it with a recursive function but stuck with field03 to save the name.</p> <p>Any help for that?</p> <p>UPDTAE:</p> <p>here is the array, so you don't have to write it:</p> <pre><code>$data['field01']['name'] = "field01"; $data['field01']['prefix'] = "C01"; $data['field02']['url'] = "http://www.url.com"; $data['field02']['user'] = "a_user"; $data['field02']['password'] = "a_password"; $data['field03'][0]['List_id'] = 1; $data['field03'][0]['Type'] = "standard"; $data['field03'][0]['Name'] = "name"; $data['field03'][1]['List_id'] = 5; $data['field03'][1]['Type'] = "standard"; $data['field03'][1]['Name'] = "name"; </code></pre> <p>Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload