Questions tagged [array-population]

11 questions
1
vote
1 answer

JS - How to populate an array with objects from another greater object

I am traying to populate an array "array1" with objects with format {a:'value', b:'value'} that come from a greater objet "objPractice", (could be a json). I don't know what I am doing wrong but I get an array with objects all equals corresponding…
1
vote
3 answers

php preg_split w/regex

returned: Array ( [0] => Array ( [0] => 17:30 Football 18:30…
user359294
  • 61
  • 1
  • 4
0
votes
1 answer

Feed data from an external database directly into an array

I have a 4D database from which I need to periodically pull data using Excel and VBA. For now, the machine that I intend to run this on is similar to a Mac mini (Late 2014) on OS 10.13.6 and Excel for Mac 2011. I know, it is old, but it is what I…
Schrocks
  • 13
  • 4
0
votes
4 answers

How do i loop string array in c# more than once?

I can't quite figure it out how to loop through string array after the first initial loop has been done. My code right now is: string[] assignments = new string[] {"A", "B", "C", "D", "E", "F"}; Array.Resize(ref assignments, 99); …
Ralfs R
  • 77
  • 1
  • 8
0
votes
1 answer

php dropdown list from array not populating

I have been having trouble populating a select element with PHP. Currently, I create an array with information pulled from a database. This is used to edit or insert an entry into a logbook for my record keeping. The variables used in the code deal…
0
votes
3 answers

Handling Array values - unset or array_pop

I have a post value like this. It is stored in $_POST. Now, I need to remove or unset the last array value i.e [submit] => Add. When I checked in SOF, they asked me to use array_pop. But that didn't work. Any help. My output: [56-1] => 0 …
0
votes
3 answers

create an array that mimics a clock (javascript)

How would you create an array that contains values, one for each hour, including AM/PM, starting at 12 AM ending on 11 PM in javascript?
Derek Adair
  • 21,846
  • 31
  • 97
  • 134
0
votes
1 answer

Extending basic Javascript Cart to be multi dimensional

I'm trying to do a 'quick' javascript shopping cart as a proof of concept by extending this nice little demo. http://www.99points.info/2010/12/ajax-shopping-cart-with-jquery-and-php/ I'm trying to extend into this the concept of item 'types' in the…
0
votes
1 answer

classic asp - dropdown to select all dropdowns with the same value as the first dropdown

I have a primary drop down list that has three values: 1 - select 2 - Fail 3 - pass the page is populated from the database, so here you could have anything from 1 to 50 dropdown to set the status of each record as fail or pass. I would like to…
-1
votes
1 answer

PHP array_pop & implode show question mark when used with foreign language

I'm using the following code to display only the last name first character on my Wordpress site: $name = $comment->comment_author; $separate = mb_split(" ", $name); $last = array_pop($separate); echo implode(' ', $separate)." ".$last[0]."."; It…
John Smith
  • 67
  • 1
  • 1
  • 14
-1
votes
2 answers

PHP : How to fix array_pop and the value 0

I´m trying from various paths to generate a dimensional array. For that, I´m using the function found here. My code function get_dir_content_to_array( string $dir_path, string $dir_filter = null, string $file_filter = null ) { if( is_dir_empty(…
J.BizMai
  • 2,621
  • 3
  • 25
  • 49