0
votes
2answers
45 views

Simple OOP/private variable query- Java

Not quite sure why this won't work, when i try to compile and run it gives me a null pointer exception. I know it's super simple and probably a stupid question but I can't seem to figure it out! ...
4
votes
6answers
70 views

How to parse a variable having a dynamic name in PHP?

I do have variables like <?php $num1 = 'txt1'; $num2 = 'txt2'; $num3 = 'txt3'; ... and I do have a loop for ($i=1; $i<100; $i++){ echo 'This is textNr'.$i.':' .$num.$i ; } I ...
0
votes
3answers
27 views

Assign array element to variable in PHP

I know this is a silly question, but i'm stucked! I have the following array: Array ( [type] => 8 [message] => Use of undefined constant hola - assumed 'hola' [file] => ...
0
votes
1answer
23 views

Variable value extract from array [closed]

Array ( [first_value] => 5555 [second_value] => 22222 [third_value] => 3333333 [some_name] => 123456 [fourth_value] => 44444 ) My question is how to get only value '123456' from ...
0
votes
4answers
48 views

Variable size array, from a function, called from a function

I know this is a bit long, but it's a tricky problem. Thanks for looking! I've been working on this far too long. I've done a lot of research and tried a lot of things, hopefully somebody can help ...
1
vote
1answer
25 views

Script to search for a value and create a variable dynamically?

Sorry if the question in the title is a bit vague, here's what I'm trying to accomplish: Is there a script out there that can search a page (or page source) for a particular determined value (for ...
0
votes
3answers
23 views

Remove element from array shell

I need to remove an element from an array in bash shell. Generally I'd simply do: array=("${(@)array:#<element to remove>}") Unfortunately the element I want to remove is a variable so I ...
-2
votes
2answers
44 views

How to get id of array and insert in mysql/php? [closed]

so I'm stumped, but I'm sure it's super easy. I'm trying to check whether a customer record exists, and if it does get the id of the existing one. Here's what I've got so far: $result = ...
0
votes
5answers
49 views

python: how to identify if a variable is an array or a scalar

I have a function that takes the argument NBins. I want to make a call to this function with a scalar 50 or an array [0, 10, 20, 30]. How can I identify within the function, what the length of NBins ...
-8
votes
2answers
54 views

C language arrays [closed]

I need an algorithm for this problem in c language An array called numbers contains 35 valid integer numbers. Determine and display how many of these values are greater than the average values of all ...
0
votes
2answers
43 views

Dynamic Variable Names with JavaScript - Two arrays?

I'm trying to generate markers for every user in my $.each loop in such a way that I can select each marker using the corresponding userId of a given user. $.each($.parseJSON(window.usersArray), ...
2
votes
3answers
21 views

How do I use a variable in an array name in PHP? (variable arrays/variable variable?)

I've looked at other questions/answers but I'm not fully understanding it. Furthermore, I haven't found one asking my exact question. I have 7 arrays storing the start and end times for a business. ...
0
votes
2answers
55 views

How can I create a variable array name in Perl?

Array @p is a multiline array, e.g. $p[1] is the second line. This code will explain what I want: $size=@p; # line number of array @p for($i=0; $i<$size; $i++) { @p{$i}= split(/ +/,$p[$i]); ...
2
votes
2answers
103 views

jQuery Create variable name from each value in array

Take array (CritPath) and for each item in array; check table and split the columns into separate arrays (SysDate & SysTime). Return the (CritPath) name plus (SysTime) name to form new variable ...
2
votes
4answers
38 views

Javascript array with custom variable indexing

Is it possible to set the custom index of an array with a variable. for example: var indexID = 5; var temp = { indexID: new Array() }; The above example sets the array index to indexID and not ...

1 2 3 4 5 40
15 30 50 per page