I think I figured this out -
Since I only have 2 pages, the first iteration of the loop sets $i greater
than than the number of pages, i.e. $i becomes 21, which is greater than 2,
so the second iteration stops there. Am I seeing this right?
So Craig's way worked because $i was left alone in the
On Saturday 18 May 2002 02:39, Sergio Tirado wrote:
> I just installed Red Hat 7.3 with Apache and PHP. I ran a simple script
> to test the imap_open function and it doesn't work when using the
> values for servers on my subnet.
>
> http://www.gym.itesm.mx/imap.php
>
> However, if the mailbox I re
That means $num_pages is equal to 2 so yes the if statement is true and it
goes onto the the for loop. Now where you are having problems is on the
second expression in the for loop.. This expression is basically saying "Do
this for loop while $I is less than or equal to 2. The third expression
t
The 20 is inserted into a MySQL LIMIT query. Page 1 = LIMIT 1,20 to get the
first 20 records from 1, then Page 2 = LIMIT 21,20 to get the next 20, etc.
I think I see the error here.
if ($num_pages >= 2) {
for ($i=1; $i<=$num_pages; $i++) {
Easy one! Hopefully you havent "jetted" yet :)
Just cut the $number = line to below the printf line and there you have it!
Rick
"How wonderful it is that nobody need wait a single moment to improve the
world." - Anne Frank
> From: "Jason Soza" <[EMAIL PROTECTED]>
> Date: Fri, 17 May 2002 20:4
> I think I figured this out -
>
> Since I only have 2 pages, the first iteration of the loop sets $i greater
> than than the number of pages, i.e. $i becomes 21, which is
> greater than 2,
> so the second iteration stops there. Am I seeing this right?
>
> So Craig's way worked because $i was left
> I think I see the error here.
>
> if ($num_pages >= 2) {
> for ($i=1; $i<=$num_pages; $i++) {
> $number = ($i * 20) + 1;
> printf("| href=\"test.php?page=%s\">Page %s | ", $number,
> $i);
>
Ok Im feeling dumb also now *hehe* What I said about putting the $number
line below the printf line.. DonĀ¹t listen to me :) Now that I know what you
want.. I know there is cleaner and better code, but it works :)
if ($num_pages >= 2) {
for ($i=1; $i<=$num_pages; $i++) {
$j = ($i==1) ? $i
I was surfing the internet today and found a site that offered a coin toss game in
PHP.The site claimed that it used the latest and most random computer algorithms
to do the Coin Toss.
In the next line it said that you (the player) would win 45% of the time.
I would like opinions how someb
I want to say right from the beginning that there is a better way of doing
this, but this will work :)
Just keep track of what the user has thrown so far and do a check on it.. So
that if it's less than 45% change the flip to what the user picked.. If that
will put it over 45% then make it opposi
On Friday 12 April 2002 13:07, Randy Johnson wrote:
> I was surfing the internet today and found a site that offered a coin toss
> game in PHP.The site claimed that it used the latest and most random
> computer algorithms to do the Coin Toss.
>
> In the next line it said that you (the player)
What's the idea behind this syntax "$_SERVER" and when did it become the
preferred method (are there docs on this)?
Cheers,
Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Saturday 18 May 2002 13:47, Brad Hubbard wrote:
> What's the idea behind this syntax "$_SERVER" and when did it become the
> preferred method (are there docs on this)?
Read the changelogs for php 4.1.X and above.
Search the archives.
Read the sample php.ini files included with the distributio
Something catastrophic happened to my webserver and while I had the data of
the database and site content backed up, I'm having trouble getting it all
back up and working.
Prior to the server crash I was using Apache 1.3.2x (can't remember exactly)
and PHP 4.1.x (not sure on this one either, last
Did you look at:
http://www.php.net/manual/fi/reserved.variables.php#reserved.variables.sessi
on
That is the new way.. And within that block of text there is a couple other
links to other pages you might want to take a look at.
Cheers!
Rick
"The glory of friendship is not the outstretched han
This page will tell you everything you need to know about the new global
arrays :)
http://www.php.net/manual/fi/reserved.variables.php
Rick
"Do all the good you can, By all the means you can, In all the ways you can,
In all the places you can, At all the times you can, To all the people you
can
On Sat, 18 May 2002 15:47, Brad Hubbard did align ASCII characters thusly:
> What's the idea behind this syntax "$_SERVER" and when did it become the
> preferred method (are there docs on this)?
Thanks to all who replied. I understand this now.
Cheers,
Brad
--
PHP General Mailing List (http://
201 - 217 of 217 matches
Mail list logo