Linked Questions

0 votes
3 answers
104 views

My array like this : $arr = array('chelsea.jpg', 'arsenal.jpg'); If I run : echo '<pre>';print_r($arr);echo '</pre>'; The result : Array ( [0] => chelsea.jpg [1] => ...
moses toh's user avatar
  • 13.3k
0 votes
5 answers
204 views

This is my current array which keep a first character from the value Array ( [n] => Array ( [0] => name_john ) [a] => Array ( [0] => age_30 ) ) foreach ($queryArray as $key) { $...
MRA's user avatar
  • 277
-3 votes
2 answers
634 views

I have the array like this: [0] => Array ( [fee_id] => 15 [fee_amount] => 308.5 [year] => 2009 ) I want change the name of parent to this: ...
Mohsen's user avatar
  • 1,422
1 vote
1 answer
419 views

how do i change keys of my array like: $arrData = array('key1'=>'data1', 'key2'=>'data2') to: $arrData = array('newKey1'=>'data1', 'newKey2'=>'data2') I like it to be done withing a ...
KoolKabin's user avatar
  • 17.8k
0 votes
3 answers
311 views

I need to merge (sort of join) two arrays with both same keys, and in result i want to have the values of the first as keys of the second one : Example : $keyArray = [ "key1" => "...
Marwen Jelloul's user avatar
0 votes
1 answer
283 views

Suppose that I have a table like this: id name age birthplace ------------------------------ 1 John 28 NY 2 Marry 23 LD 3 Mohamad 34 Malaysia ... I do while loop ...
Phuong Ng's user avatar
1 vote
3 answers
236 views

I have this array: `$arr = array( 'foo' => 'foo', 'bar' => array( 'baz' => 'baz', 'candy' => 'candy', 'vegetable' => array( 'carrot' => '...
hanane azee's user avatar
1 vote
3 answers
453 views

At the moment I am doing a foreach over the array, and creating a new array as I go. For example: $newMap = []; foreach ($oldMap as $key => $value) { // Apply some complex logic ...
DatsunBing's user avatar
  • 9,124
2 votes
1 answer
218 views

this below simple code i want to replace [3] to 2010-01-01 and [6] to edited in array fetch. i find function to edit in place with key but thats dont work correctly PHP: while ( $aRow = ...
user avatar
1 vote
3 answers
82 views

I have an array like the one below Array ( [0] => Array ( [name] => Alex [age] => 30 [place] => Texas ) [1] =&...
user2509780's user avatar
0 votes
0 answers
135 views

This is the JSON { "table-name": "Kiwi", "created-on": "November 20, 2021", "columns": { "Info": { "type": "...
Maharlikan's user avatar
0 votes
3 answers
64 views

I need help to change the index of an array. I have this array: $items = array('items' => array( 0 => array( 'item_id' => 1, 'item_amount' => 100, ), 1 => ...
Amanda Thompson's user avatar
0 votes
3 answers
67 views

My goal is to be able to update a key value inside of an array inside of an array and I'm don't know if I'm using the right php array function. BEFORE: array:2 [ "week_number" => 1 "games"...
user avatar
1 vote
1 answer
84 views

I have built a multidimensional array for usage in a custom Wordpress query. Although it is Wordpress I feel that this is more a basic PHP question. The array that I have now outputs everything ...
Aj Troxell's user avatar
0 votes
3 answers
59 views

I needed an assistant about replace for simple variables: $html = '<{$headtype} class="{$class}">{$text}</{$headtype}>'; $array['headtype'] = 'h1'; $array['class'] = 'classname'; $...
Hossam Mega's user avatar

15 30 50 per page