Dan skrev:
Oh yeah, the problem isn't that I'm using - instead of =. Well that
was a problem but I fixed that and it's still not working.
- Dan
Dan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a little problem assigning a value to an array which has a
key. It's
Jim Lucas wrote:
Fredrik Thunberg wrote:
Dan skrev:
Oh yeah, the problem isn't that I'm using - instead of =. Well
that was a problem but I fixed that and it's still not working.
- Dan
Dan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm having a little problem assigning
For exactly the same reason as
for( $i = 0; $i 10; $i++)
produces 0-9
It loops whule $i is lesser than 'Z'
When $i becomes 'Z' it stops and doesn't echo
But i guess you're having trouble with (note the '='):
for ($i = 'A'; $i = 'Z'; $i++)
{
echo $i . ' ';
}
This might produce a wierd
No, that won't work
Either use != 'AA'
or
for( $i = ord('A'); $i = ord('Z'); $i++)
{
echo chr( $i ) . ' ';
}
Jason skrev:
Because you need $i= 'Z' to get Z included as well.
J
At 08:49 09/07/2007, Xell Zhang wrote:
Hello all,
I met a very strange problem today. Take a look at the codes
Stut skrev:
sivasakthi wrote:
Thanks for your response..
Actually i have the collections of strings like,
$not_quite_an_array =
'squid %tu %tl %mt %A
test %st.%hs %a %m %tu %th %Hs %Ss
test1 %tv %tr %Hs.%Ss %mt';
from that i need to split name of each line..
$names = array();
foreach
$q = ceil( month / 4 );
--
/Thunis
The ships hung in the sky in much the same way that bricks don't.
--The Hitchikers Guide to the Galaxy
revDAVE skrev:
I have segmented a year into four quarters (3 months each)
nowdate = the month of the chosen date (ex: 5-30-07 = month 5)
Q: What is the
of course ceil( month / 3 );
--
/Thunis
Don't panic.
--The Hitchikers Guide to the Galaxy
Fredrik Thunberg skrev:
$q = ceil( month / 4 );
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
snip
Just did a quick benchmark for 10.000 hands (making a full deck on
your code, 23.5 players):
Microtime difference:
Ryan's code:15.725826978683
Tijnema's code:0.40006709098816
Unique decks out of 1:
Ryan's code:1
Tijnema's code:1
When making a full deck my code is 40 times
Ron Piggott skrev:
How do I break $start_date into 3 variables --- 4 digit year, 2 digit
month and 2 digit day?
$start_year = ;
$start_month = ;
$start_day = ;
Of course depending on what $start_date looks like, but this should work
most of the time:
$timestamp = strtotime( $start_date
GROUP BY whatever_id_you_want in the SQL
Dan Shirah skrev:
Good Morning everyone.
In the below code I am pulling records from two tables. the records are
tied together by a common key in a 3rd table. Everything works correctly
down to the $result.
// Connect to the database
$connection =
Edward Kay skrev:
-Original Message-
From: Marcelo Wolfgang [mailto:[EMAIL PROTECTED]
Sent: 04 May 2007 14:37
To: php-general@lists.php.net
Subject: [PHP] Selecting a special row from the database
Hi all,
I'm building a news display page for a website, and since the user has 2
Lester Caine skrev:
Can someone with a few more working grey cells prompt me with the
correct command to split a string.
The entered data is names, but I need to split the text up to the first
space or comma into one string, and the rest of the string into a
second. It's the 'first either
Don't know your problem but:
if $totalTime is total length in seconds
$minutes = floor($totalTime / 60);
$seconds = $totalTime % 60;
/Fredrik
Sebe skrev:
maybe someone can figure why sometimes i get negative values for seconds..
$job['finished'] and $job['finished'] are both unix
marcelo Wolfgang skrev:
Hi all,
I'm new to this list and new to php programming so sorry if I do
something wrong here :)
Ok, now to my problem.
I've created a query to update a mysql db, and it isn't working, and
it's not throwing me any errors, so I need some help to figure out
what's
Stephen wrote:
Hi list, I'm trying to make a script which requires that I perform a
printf() formatting on a string, but instead of outputting the result
I need to set the result as a variable to write to a file. Can any one
advise me on how to do this? or if it's even possible?
Kind
Reinhart Viane skrev:
Is this a good way to convert 01/02/2007 to 20070201
$value='01/02/2007';
list($day, $month, $year) = split('[/.-]', $value);
$filename=$year.''.$month.''.$day;
It does work but i would like to verify if there are no better, more logical
ways to do this.
Thanks
date(Ymd, strotodate( $value ));
Of course I mean:
date( Ydm, strtodate( $value ));
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It doesn't help to reset any values. The form data is being resent by
the browser itself, just if the user presses the submit button again
with the same data.
What you could do is mabye use a session to see if the particular user
has sent form data before.
/Fredrik Thunberg
Beauford skrev
Hi
sort returns a bool, the sorted array passed by reference.
So try:
$result = sort( $array );
//Now $array is sorted
print_r( $array );
/Fredrik Thunberg
Kevin Murphy skrev:
I'm having trouble sorting an array. When I do, it empties the array
for some reason. Take the following code
Try
$try = $var[1.2];
If your array looks like the one below then there is no $var[0] and
therefore you get NULL
/Thunis
Brian Dunning skrev:
That seems right to me too - but everything I try returns NULL. I set
$try=$var[0], and $try ends up being null; print_r($try) gives blank.
I even
one. Can
this be the problem?
Cheers
/Fredrik Thunberg
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
21 matches
Mail list logo