Search found 129 matches
- Tue May 24, 2005 4:12 pm
- Forum: PHP - Code
- Topic: MSN via php
- Replies: 15
- Views: 3498
- Tue May 24, 2005 2:58 pm
- Forum: PHP - Code
- Topic: MSN via php
- Replies: 15
- Views: 3498
- Tue May 24, 2005 2:19 pm
- Forum: PHP - Code
- Topic: [SOLVED]Easy sum...
- Replies: 10
- Views: 2157
- Fri May 20, 2005 8:38 am
- Forum: PHP - Code
- Topic: Whos Online - Cookies?
- Replies: 8
- Views: 843
- Tue May 03, 2005 10:05 am
- Forum: PHP - Code
- Topic: Occurrences within an array
- Replies: 4
- Views: 482
- Tue May 03, 2005 9:19 am
- Forum: PHP - Code
- Topic: Occurrences within an array
- Replies: 4
- Views: 482
Occurrences within an array
Hi, I'm currently having a small problem in finding out how many times a string occurs in an array - without looping through and testing every element within it. For instance $animals = Array = ('Dog', 'Cat', 'Dog', 'Goldfish', 'Dog', 'Bear', 'Cat'); So, if I did a search for 'Dog', it would return ...
- Sat Mar 19, 2005 6:20 pm
- Forum: PHP - Code
- Topic: Battle Formula
- Replies: 12
- Views: 2282
I would use a while statement, and keep looping it until one of the players dies. To see whos player's turn it is, I would look at the current battle turn, and use a formula to see whos go it should be, and then let that person have his go. Once (s)he has had his/her go, the loop continues. Too late...
- Sat Mar 19, 2005 6:13 pm
- Forum: Databases
- Topic: Manipulating new generated column
- Replies: 6
- Views: 614
- Fri Mar 18, 2005 9:00 am
- Forum: Databases
- Topic: Manipulating new generated column
- Replies: 6
- Views: 614
- Fri Mar 18, 2005 8:15 am
- Forum: Databases
- Topic: Manipulating new generated column
- Replies: 6
- Views: 614
- Fri Mar 18, 2005 6:05 am
- Forum: Databases
- Topic: Manipulating new generated column
- Replies: 6
- Views: 614
Manipulating new generated column
My SQL query creates a new column from supplied data - quantity, and cost of item, so you are left with the generated column subTotal. However, I cannt refer to this column to do anything with it - I want to add up all of the subTotal columns and produce a total at the bottom. Does anyone know of ho...
- Fri Feb 18, 2005 4:50 pm
- Forum: PHP - Code
- Topic: [SOLVED] Replace only one instance
- Replies: 3
- Views: 1333
- Fri Feb 18, 2005 4:31 pm
- Forum: PHP - Code
- Topic: [SOLVED] Replace only one instance
- Replies: 3
- Views: 1333
[SOLVED] Replace only one instance
Is there a way to only replace 1 instance of a string within a string. For instance: $string = "The house is made of bricks bricks."; Is there a way to only take out the first "bricks" within that string. Please bare in mind that the string could be anything, of any length. Thanks.
- Wed Feb 16, 2005 10:10 am
- Forum: Databases
- Topic: Optimisation
- Replies: 7
- Views: 1385
- Wed Feb 16, 2005 9:27 am
- Forum: Databases
- Topic: Optimisation
- Replies: 7
- Views: 1385