Search Results

Search found 8 results on 1 pages for 'matthy'.

Page 1/1 | 1 

  • PHP: go back to the start of loop using a sort of 'break' ?

    - by matthy
    Hi i have a loop and i was wondering if there was a command that you can jump back to the start of the loop and ignore the rest of the code in the loop example: for ($index = 0; $index < 10; $index++) { if ($index == 6) that command to go the start of the loop echo "$index, "; } should output 1,2,3,4,5,7,8,9 and skip the six sort of same result as for ($index = 0; $index < 10; $index++) { if ($index != 6) echo "$index, "; } is there a command for that? thanks, matthy

    Read the article

  • How can you write a function that accepts multiple types?

    - by matthy
    I have a function that should work on int[] and on String[] now i have made the same function with a int parameter and an String parameter however if it has to go this way its a bit copy paste work and doesn't look very organized is there a way to solve this and put these 4 functions in 2? static public void print(String s) { System.out.println(s); } static public void print(int s) { System.out.println(s); } static public void printArray(String[] s) { for (int i=0; i<s.length; i++) print(s[i]); } static public void printArray(int[] s) { for (int i=0; i<s.length; i++) print(s[i]); } Thanks Matthy

    Read the article

  • PHP: why is this null different from the other null

    - by matthy
    hi i tried 2 things what should be the same however it my testing says different does anyone know why the only thing i do is put it in a variable... if ($_SESSION[$something] === null) echo("this is null"); $_SESSION[$something] does not exists so it indeed says: "this is null". now look at this $theSession = $_SESSION[$something]; if (theSession === null) echo("this is null"); now it does not say "this is null" while it should be exactly the same right?

    Read the article

  • SQL, PHP: want to get the collums of a table INFORMATION_SCHEMA gives acces denied --> alternative?

    - by matthy
    hi what i am trying to do is get all the collums of a table (the table can be empty) example of what i did before: SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'aTable' AND table_schema = 'theDatabase' it works perfectly on localhost however on my provider it gives: #1142 - SELECT command denied to user 'username'@'localhost' for table 'COLUMNS' is there an alternative that doesn't use the INFORMATION_SCHEMA??

    Read the article

  • sql: trying to select the second biggest element but selects the biggest

    - by matthy
    we want to have the second biggest element. We first use ANY to exclude the biggest one. Then we use all to select the biggest. However when we run this query, it shows the biggest and not the second one. Why? SELECT * FROM bestelling WHERE totaalprijs > ALL ( SELECT totaalprijs FROM bestelling WHERE totaalprijs < ANY ( SELECT totaalprijs FROM bestelling ) ) elements in the table: 157.00 5.00 82.80 15.00 20.00 20.00

    Read the article

1