[PHP] random number problem...

2001-07-10 Thread James Bartlett
Hi, I've written a picture rotation script, file paths are stored in a file and are called depending on a random number generator.. The problem is that out of 14 possible numbers only 7 are been generated. the code I'm using is... srand ( (double) microtime()*1000); $numbertodisplay =

[PHP] Variables

2001-07-10 Thread James Bartlett
Hi, This might sound really simple but plz humour me :) How can I tell if two text variables are equal to one another? If I use.. if($text1 = $text2) { echo The variables are equal; } else { echo The variables are not equal; } then the code in the else state is always printed even if I know

Re: [PHP] Variables

2001-07-10 Thread James Bartlett
I have tried that also...it still does not want to work... - Original Message - From: Dallas K. To: James Bartlett ; [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 5:43 AM Subject: Re: [PHP] Variables don't use the quotes if($test1 == $test2) {echo True

[PHP] Help with a variable

2001-07-09 Thread James Bartlett
Hi, Is there some way that I can check to see if a variable is present? e.g. if (variable is not present) { set variable to 0; } else { some code that uses variable; } Thanks for any advice. James

[PHP] Determining the length of a string

2001-07-07 Thread James Bartlett
Hi, Say you read in the contents of a text file and wanted to know the length of the text you had read in what command would you use? Thanks James

[PHP] Problem writting to file...

2001-07-06 Thread James Bartlett
Hi, I'm trying to write data to a file but for some reason it will not store numbers in the file...Here's the code I'm using...(as an example) ?php $fp = fopen(./data.txt, w+); $counter = 0; while ($counter 6) { fwrite($fp, $counter . \n); $counter = $counter +1; } fclose ($fp); ? Thanks

Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett
nope... The 'new line' tages are printed inside the file but not the values produced by the counter... - Original Message - From: Chris Anderson To: James Bartlett ; [EMAIL PROTECTED] Sent: Friday, July 06, 2001 7:25 PM Subject: Re: [PHP] Problem writting to file... I

Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett
No errors at all... - Original Message - From: Tyler Longren To: php-general ; James Bartlett Sent: Friday, July 06, 2001 7:29 PM Subject: Re: [PHP] Problem writting to file... Any errors being given to you? Tyler - Original Message - From: James Bartlett

Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett
is = . $counter . \n); $counter = $counter +1; } fclose ($fp); ? - Original Message - From: James Bartlett [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 06, 2001 1:15 PM Subject: [PHP] Problem writting to file... Hi, I'm trying to write data to a file but for some

Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett
++; fwrite($fp, $counter . \n); } fclose ($fp); ? Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: James Bartlett [mailto:[EMAIL PROTECTED]] Sent: Friday

Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett
: James Bartlett [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 11:46 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Problem writting to file... When I use that code I get the following... Counter is = 0 Counter is = 1 Counter is = 2 Counter is = 3 Counter is = 4 Counter is = 5

Re: [PHP] Problem writting to file...

2001-07-06 Thread James Bartlett
No luck there... - Original Message - From: Brad S. Jackson To: James Bartlett Sent: Friday, July 06, 2001 8:01 PM Subject: Re: [PHP] Problem writting to file... Sometimes you have to do this to make it work. fwrite($fp, strval($counter) . \n); James Bartlett

[PHP] Writting to files.?

2001-07-05 Thread James Bartlett
Hi, Anyone know how I can write and read to different lines in a file rather than just adding to the text already on the first line of the file? Thanks Zotud

Re: [PHP] Writting to files.?

2001-07-05 Thread James Bartlett
To: James Bartlett Cc: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 6:40 PM Subject: RE: [PHP] Writting to files.? On 05-Jul-01 James Bartlett wrote: Hi, Anyone know how I can write and read to different lines in a file rather than just adding to the text already on the first