I HATE Are you sure? prompts. If I wasn't sure, I wouldn't have
clicked it in the first place.
If you want to make your users happy, trust them when they say
Delete, but make it easy to undo. Instead of deleting the records,
just set the Delete flag and timestamp. Then when the odd user
http://www.experts-exchange.com/Web/Web_Languages/PHP/PHP_Installation/Q_21077014.html
~viraj.
On 9/19/05, Mark Rees [EMAIL PROTECTED] wrote:
I'm trying to connect to my MySQL server with mysql_connect(...). The server
is up and running, and I'm running Apache with PHP properly installed. :
This type of code is used in a few places, so I'd like a little help
converting it to 'good code' under the new rules ;)
Get the key from an array ( fails because key(array) )
if( $pId == key( $this-getFunc() ) ) {
In getFunc()
return ( $this-getAssoc(select Id, Content from
Hi all oracle+php expert,
we kept all image in oracle db. Now nearly we have 1 000 000 image in
database. we want to export them to directory. but with php we couldn't do
it.
our process : ordimage type - blob type - jpeg file type -
directory(save)
Any body know it? any advice, we appreciate!!
Lester Caine wrote:
This type of code is used in a few places, so I'd like a little help
converting it to 'good code' under the new rules ;)
They're not new rules. PHP is just warning you where it didn't before.
It was still bad coding practice before.
Get the key from an array ( fails
on 09/19/2005 02:33 PM Chris W. Parker said the following:
Let's take for example a class called 'Customer' that (obviously)
manipulates customers in the database. Here is a very basic Customer
class. (Data validation and the like are left out for brevity.)
This is a basic object
Jasper Bryant-Greene wrote:
Lester Caine wrote:
This type of code is used in a few places, so I'd like a little help
converting it to 'good code' under the new rules ;)
They're not new rules. PHP is just warning you where it didn't before.
It was still bad coding practice before.
Since
Lester Caine wrote:
I suppose the REAL questions was - Why was using the function in this
way a 'bad practice', is there any way that it could be made a 'good
practice' since the intent is so obvious?
I understand the new checks, but I don't see that the original was
particularly 'bad' - only
Hi Chris,
nice thread, good questions - nice to see some real programming
theory being discussed - does us all some good :-)
here is my take, hth:
Chris W. Parker wrote:
Anas Mughal mailto:[EMAIL PROTECTED]
on Monday, September 19, 2005 4:02 PM said:
The simplest way to solve this
On 9/20/05, Srinivasan Kumar [EMAIL PROTECTED] wrote:
hello sir,
I am srinivasan,I am a web designer.I hered about PHP
is the safest pages while using monetory
transaction,
mmm! nop, PHP is not providing anything to secure your transactions
otherthan few fuctions to handle your login sessions
Jasper Bryant-Greene wrote:
Lester Caine wrote:
I suppose the REAL questions was - Why was using the function in this
way a 'bad practice', is there any way that it could be made a 'good
practice' since the intent is so obvious?
I understand the new checks, but I don't see that the original
Ok thanks a lot!
Joe Wollard wrote:
I have try to use the same $db and to create a new one...
Are you trying to use the $db object inside of another function later
in the code? If so you'll need to use $GLOBALS['db'] instead.
Sorry, this is the only thing I can think of with your
Ok!
No i do not run mmcache, $GLOBAL is ok
thanks a lot!
Joe Wollard wrote:
I have try to use the same $db and to create a new one...
Are you trying to use the $db object inside of another function later
in the code? If so you'll need to use $GLOBALS['db'] instead.
Sorry, this is the only
hello
i installed mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz, i followed
the instruction on the INSTALL-BINARY file. after that i installed
httpd-2.0.54.tar.gz followed the instruction on the INSTALL file. also
installed php-5.0.4.tar.gz
followed the install intruction in the INSTALL
Brian Dunning wrote:
I got a 12-hour invoice from a consultant who was tasked to do the
following:
There are people that can do it faster ... then again it seems about right
given the time it takes to customize, tweak and secure allsorts of things...
I might add tho that a 'professional'
Chris W. Parker wrote:
Hello,
About a few weeks ago I started seeing three emails that all come at the
same time (within the same minute) that seem to be trying to exploit a
feedback form I have on our website. Everytime someone submits a
feedback form I am sent the information they entered.
Jochem Maas wrote:
Jasper Bryant-Greene wrote:
From the PHP manual [2]:
| the following examples of passing by reference are invalid:
|
| foo(bar()); // Produces fatal error since PHP 5.1.0
| foo($a = 5); // Expression, not variable
if foo() expects one args by reference then why is doing:
Hi All
I am having an issue when trying to parse an xml document with namespaces.
The XML data I am trying to parse looks like the following
my:object name=__root%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3Emy:variable
Jasper Bryant-Greene wrote:
Jochem Maas wrote:
Jasper Bryant-Greene wrote:
From the PHP manual [2]:
| the following examples of passing by reference are invalid:
|
| foo(bar()); // Produces fatal error since PHP 5.1.0
| foo($a = 5); // Expression, not variable
if foo() expects one args
Hello Everyone,
I have some code that is using COM to interact with MS Word to create a mail
merge based on my mysql database, however it is running dreadfully slow
13.53846 seconds to be exact. This is only running on 34 records, i could
imagine running this on a few hundred records not to
Hi there!
I guess this is an easy question. I have string...
Hello you
and I want to get the Hello part.
How do I do that? (I can of course search for first occurence of space and
then use substr, but I guess there is an easier solution?
/G
http://www.varupiraten.se/
--
PHP General
Why not top-post? It's much faster to read so I won't have to scroll
down to read the message.
Michael Sims already solved my problem. But thanks for the help and
to Robert also. :)
Jasper Bryant-Greene...
Please don't top-post. Sorry, I assumed that code was part of your
error_handler.
Joseph Crawford wrote:
Hello Everyone,
I have some code that is using COM to interact with MS Word to create a mail
merge based on my mysql database, however it is running dreadfully slow
13.53846 seconds to be exact. This is only running on 34 records, i could
imagine running this on a few
... I hope you have a sense of humor Jon...
Jon wrote:
I am trying to copy the files needed to run a php commandline script so that
I can send them to a different computer and run as a scheduled task. I do
not know what I am missing but for some reason my file commands do not seem
to be
[snip]
However, this really isn't what I'm looking for. I'm simply looking for
a way to parse PHP code from within existing HTML pages, so that I can
migrate a site from Apache to IIS6.0.
Like I said, if I were using Apache, I would just add .html to my
AddType directive, and call it good.
Gustav Wiberg wrote:
Hi there!
I guess this is an easy question. I have string...
Hello you
and I want to get the Hello part.
How do I do that? (I can of course search for first occurence of space
and then use substr, but I guess there is an easier solution?
how much easier do you want
Robert Cummings wrote:
On Sun, 2005-09-18 at 03:18, viraj wrote:
no! it's not a Windows World anymore.. ;-)
http://news.netcraft.com/archives/web_server_survey.html
As much as I dislike Microsoft and its practices I bring bad news. The
above only indicates that it's not an IIS world.
I am not sure where you got the idea that it is creating an instance of word
for every record, but it creates one instance then loops through the records
using that one instance.
On 9/20/05, Jochem Maas [EMAIL PROTECTED] wrote:
Joseph Crawford wrote:
Hello Everyone,
I have some code
[snip]
http://news.netcraft.com/archives/web_server_survey.html
force be with you in the new job Jay. :-)
[/snip]
Thanks Jochem!
Now, of course, I didn't mean that the world (generalization) was a Windows
one, but just my local world. I am working towards some things that will
allow the
Murray @ PlanetThoughtful wrote:
Once he understands how to solve class abstraction problems such as
the one he is asking about, he will be better equipped to deal with a
wider range of application development tasks.
I agree with this.
This is not to trivialize your Metastorage project (or,
- Original Message -
From: Jochem Maas [EMAIL PROTECTED]
To: Gustav Wiberg [EMAIL PROTECTED]
Cc: PHP General php-general@lists.php.net
Sent: Tuesday, September 20, 2005 2:24 PM
Subject: Re: [PHP] Easy question - delete strings from the beginning of
space...
Gustav Wiberg wrote:
Hi
- Original Message -
From: Gustav Wiberg [EMAIL PROTECTED]
To: Jochem Maas [EMAIL PROTECTED]
Cc: PHP General php-general@lists.php.net
Sent: Tuesday, September 20, 2005 3:04 PM
Subject: Re: [PHP] Easy question - delete strings from the beginning of
space...
- Original Message
Michael Sims wrote:
Murray @ PlanetThoughtful wrote:
Once he understands how to solve class abstraction problems such as
the one he is asking about, he will be better equipped to deal with a
wider range of application development tasks.
I agree with this.
This is not to trivialize your
Joseph Crawford wrote:
I am not sure where you got the idea that it is creating an instance of word
I got the idea from your code, but I just gave it a quick glance...
that said you instantiate a new COM object in at least 3 places...
CreateHeader()
CreateDataSource()
CreateDocument()
which
Hello, I'm novice in using sessions and therefore I need some help.
?
session_start();
session_register('pocet');
$count++;
echo $count;
session_destroy();
?
a href=test.php??php echo(SID)?link/a
and when i click on link always I have in $count value 1 but I need
value
and when i click on link always I have in $count value 1 but I need
value 2,3,
how to do it ?
?php
session_start();
if (! isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
}
$_SESSION['count']++;
//session_destroy(); - don't do that! It destroys the
//session associated with the
Roman Duriancik wrote:
?
session_start();
session_register('pocet');
$count++;
echo $count;
session_destroy();
?
a href=test.php??php echo(SID)?link/a
and when i click on link always I have in $count value 1 but I need
value 2,3,
how to do it ?
i think this is what you
Hello, I'm novice in using sessions and therefore I need some help.
?
session_start();
session_register('pocet');
$count++;
echo $count;
session_destroy();
?
a href=test.php??php echo(SID)?link/a
and when i click on link always I have in $count value 1 but I need
value
how to do it ?
http://php.grn.es/manual/en/ref.session.php
Hint: Look at example 1 where it says
?php
session_start();
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
} else {
$_SESSION['count']++;
}
echo $_SESSION['count'];
?
a href=test6.php??php echo(SID)?link/a
Also
OK, OK, Ha-ha Thought that you guys could read my mind...
Here is the error
Warning: fopen(C:\windows\Desktop\php\php pages\phpout.txt)
[function.fopen]: failed to open stream: No such file or directory in
C:\windows\Desktop\php\php pages\phpout.txt on line 12
and of course the fwrite and
When I try to insert a field into my database it shows as Resource id#21?
I must be doing something dim.
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
When I try to insert a field into my database it shows as Resource id#21?
I must be doing something dim.
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ross wrote:
When I try to insert a field into my database it shows as Resource id#21?
I must be doing something dim.
Indeed you are; perhaps if you show a code snippet someone can guide you to
the light :-)
Cheers
--
David Robley
Do not believe in miracles -- rely on them.
--
PHP
Joseph Crawford wrote:
Jochem,
I did attempt what you wanted me to try, however when i did that it just
hung up on the OpenHeaders
$this-obj-ActiveDocument-MailMerge-OpenHeaderSource($this-mm_data_dir.'/header.doc');
maybe your Close() function should be different?:
private function
Tanks all for help about session
I have other question.
In php.ini I set folder for sessions file on c:\tmp but what are
happens when disk is full, how to automatically delete nonactive
sessions files ?
thanks
roman
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Roman Duriancik wrote:
Tanks all for help about session
I have other question.
In php.ini I set folder for sessions file on c:\tmp but what are
happens when disk is full, how to automatically delete nonactive
sessions files ?
PHP will handle this automatically based on the
I was using the variable $link in a form. is it a reserved word or
something??
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I was using the variable $link in a form. is it a reserved word or
something??
Most likely the var $link is being used for db-operations (or similiar)
previously, thus the return value of any resource-based operation is passed
to the var $link. Check the all the scripts that are involved in
When I try to insert a field into my database it shows as Resource id#21?
I must be doing something dim.
Some could would definetely help here...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jochem Maas wrote:
foo($a = 5);
by definition the expression is evaluated _before_ the function is
called - so the expression is not passed to the function, the result
of the expression is passed ... I was under the impression that the
the expression evaluates to a 'pointer' (I'm sure thats
Nevermind. I get the award for not checking code on this one. I did not
pay close enough attention to what I was doing and had the path with \'s
instead of /'s. I fixed that and it started working. Imagine that. Buggy
code was causing the error. Sorry for the trouble.
Jon [EMAIL PROTECTED]
Jochem Maas mailto:[EMAIL PROTECTED]
on Tuesday, September 20, 2005 2:37 AM said:
this 'fairly recent' class of attack is already quite well documented,
google around for more info.
Actually I did do some googling on it before posting and was relatively
confident that the attempt to
Hello,
on 09/20/2005 04:59 AM Murray @ PlanetThoughtful said the following:
Let's take for example a class called 'Customer' that (obviously)
manipulates customers in the database. Here is a very basic Customer
class. (Data validation and the like are left out for brevity.)
This is a basic
Is there a quick way to compare dates in the format dd/mm/yy without
exploding and comparing the individual parts?
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to get rid of potential double spaces after the explode, you could do:
foreach ($words as $word) {
if (!empty($word)) {
$first = $word;
break;
}
}
echo $first;
This will always return the first word.
Jordan
On Sep 20, 2005, at 7:24 AM, Jochem Maas wrote:
how much
Ross wrote:
When I try to insert a field into my database it shows as Resource id#21?
I must be doing something dim.
Right after you try to do the insert, echo out mysql_error()
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List
September 20, 2005
FOR IMMEDIATE RELEASE
Contact: Gregory Beaver ([EMAIL PROTECTED])
As of Sunday, September 18, 2005, the PEAR installer has reached
maturity as an enterprise-level installation tool for PHP code. The
release of version 1.4.0 stable ushers in several essential features for
Jochem Maas wrote:
Basically, in PHP, a reference (such as what key() takes as a
parameter [1]) can only point to an actual variable, not directly to
the result of a function. So you have to assign the output of the
function to a variable first.
wtf, Im now officially confused (before I
Thanks Viraj,
Telneting gives an error like this (translated from Swedish language):
Connecting to imap.liu.se...Couldn't connect to the host computer, using
port 143: The connection failed.
I guess I'm not getting any answer then.
Regards,
Joachim
viraj [EMAIL PROTECTED] skrev i meddelandet
thanks everyone for the crash course in better understanding the underlying
mechanisms!
... I'm probably not the only one that learnt something from this ;-)
Dragan Stanojevic - Nevidljivi wrote:
Jochem Maas wrote:
Basically, in PHP, a reference (such as what key() takes as a
parameter [1])
Just want to say that
telnet imap.liu.se 993
works just fine (the port for secure communication). But then the command
prompt starts to look strange. I cannot see when I'm typing (perhaps it has
to do with the secure communication link?!). Where do I go from here? It
still doesn't work with
Further, when changing the imap_open line in the script to
$mbox = imap_open({imap.liu.se:993/imap/ssl}, joape382, fiol);
(I added the /imap/ssl part) I immediately got the following response:
Warning: imap_open(): Couldn't open stream {imap.liu.se:993/imap/ssl} in
Jay Blanchard wrote:
[snip]
However, this really isn't what I'm looking for. I'm simply looking for
a way to parse PHP code from within existing HTML pages, so that I can
migrate a site from Apache to IIS6.0.
Like I said, if I were using Apache, I would just add .html to my
AddType
Lester Caine wrote:
This type of code is used in a few places, so I'd like a little help
converting it to 'good code' under the new rules ;)
Get the key from an array ( fails because key(array) )
if( $pId == key( $this-getFunc() ) ) {
In getFunc()
return (
Michael Sims wrote:
Jochem Maas wrote:
foo($a = 5);
by definition the expression is evaluated _before_ the function is
called - so the expression is not passed to the function, the result
of the expression is passed ... I was under the impression that the
the expression evaluates to a
Rasmus Lerdorf wrote:
Michael Sims wrote:
When used as an expression, an assignment evaluates to whatever is
on the right side of the assignment operator, not the left.
Example:
[...]
foo($a = 5);
and
foo(5);
are exactly the same...
The value passed is the same, but when passed as
Jon wrote:
OK, OK, Ha-ha Thought that you guys could read my mind...
no this is php-generals not php-psychics - easy mistake to make tho ;-)
glad to see you can take a little stick :-) you'll do well here ;-)
to start with, it will probably help to track down the problem if
you turn off
Michael Sims wrote:
Jochem Maas wrote:
foo($a = 5);
by definition the expression is evaluated _before_ the function is
called - so the expression is not passed to the function, the result
of the expression is passed ... I was under the impression that the
the expression evaluates to a
Ok so finally i implemented my logging class into my mail merge object, this
is the results
Word - Application Opened.
Word - Document1 Document Added.
Word - header.doc Document Saved.
Word - header.doc Document Closed.
Word - Document2 Document Added.
Word - ds.doc Document Saved.
Word -
Is there a quick way to compare dates in the format dd/mm/yy without
exploding and comparing the individual parts?
Compare them in what way? Before, after, days between?
In any case, i'd look at strtotime() to convert them into timestamps, then
diff them to get the number of seconds b/n
September 20, 2005
FOR IMMEDIATE RELEASE
Contact: Gregory Beaver ([EMAIL PROTECTED])
As of Sunday, September 18, 2005, the PEAR installer has reached
maturity as an enterprise-level installation tool for PHP code. The
release of version 1.4.0 stable ushers in several essential features for
Probably your code, changes were made in the newer versions of PHP which
make some older scripts unusable, register globals for instance, do you
have the PHP.ini settings to show errors turned on, you should, if you
post the code snippet someone will probably be able tell whether its the
code
Hi all
I have a hotel booking system where for sppecific periods we have specific
availability
e.g. hotel_id, hotel_name, hotel_fromperiod, hotel_toperiod,
hotel_availablesinglerooms
1, Hilton, 20/06/05, 20/08/05, 20
We have a second table for recording the bookings
e.g.hotel1_id,
Jochem Maas wrote:
Michael Sims wrote:
So, as far as foo() knows:
foo($a = 5);
and
foo(5);
are exactly the same...
I don't think they are, and you're examples don't prove it.
Anyone care to come up with the proof.
No, I was wrong, Rasmus corrected me. That's my one allowed mistake
Hi all.
I thought I may of read of this somewhere- but I may be wrong. I am also
not sure whether this is allowed by banks, so please let me know- I want
to stay on the right side of the law!
I'd like a php script to access my bank balances and send me an email
daily. I know how to set up cron
Jochem Maas wrote:
Michael Sims wrote:
So, as far as foo() knows:
foo($a = 5);
and
foo(5);
are exactly the same...
I don't think they are, and you're examples don't prove it.
Anyone care to come up with the proof.
No, I was wrong, Rasmus corrected me. That's my one
[snippage]
I do not understand why this could bother you or anybody else. If you
have a better solution, nothing stops you to make your recommendations.
Hi Manuel,
I did make my recommendation. To you. It went something like (and I'm
paraphrasing), Your proposed solution doesn't solve the
This is not to trivialize your Metastorage project (or, to be more
accurate, I know nothing about it, so it's not my place to trivialize
it or otherwise), but to point out that 'out-of-the-box' solutions to
fundamental coding development problems probably ultimately makes for
a poorer
Greetings.
I'm attempting to create an HTML email via PHP and cannot get the email
to render in the correct font. I've made several stabs at it, the most
recent one below. The same code that works just fine on a web page
won't work for me here. What am I doing wrong?
Any and all help
I. Gray wrote:
Hi all.
I thought I may of read of this somewhere- but I may be wrong. I am also
not sure whether this is allowed by banks, so please let me know- I want
to stay on the right side of the law!
Your account...I can't see where it would be a problem with how you
access it.
I'd
Murray @ PlanetThoughtful wrote:
My post was not aimed at saying 'using packaged approaches to solve
coding problems is bad', but to say 'the original poster is asking a
fundamental learning question, so a packaged approach will possibly,
maybe even probably, hamper his development as a
Curl- ahh, thanks not something I've looked into yet. Are there any
other resources out there that I could look at for learning about it?
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry I've been so quiet on this topic since I started it but I've
basically been overwhelmed with information! :) I was hoping the
answer(s) would be a lot more plain and simple than it(they) has been so
I could get to implementing some things right away. But I'm afraid it's
going to take me
Somebody knows a chat module to be used for conversation between only
two people?
PS: sorry, my english is not very good :P
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Murray @ PlanetThoughtful mailto:[EMAIL PROTECTED]
on Tuesday, September 20, 2005 8:15 AM said:
And it's also worth mentioning at this point that it might present
more of a challenge to the original poster to implement and make use
of a complex data abstraction package [1] than to learn a
John Nichel wrote:
I. Gray wrote:
I thought I may of read of this somewhere- but I may be wrong. I am also
not sure whether this is allowed by banks, so please let me know- I want
to stay on the right side of the law!
Your account...I can't see where it would be a problem with how you
Hello Kenn,
Tuesday, September 20, 2005, 9:32:47 PM, you wrote:
I'm attempting to create an HTML email via PHP and cannot get the
email to render in the correct font. I've made several stabs at it,
the most recent one below. The same code that works just fine on a
web page won't work for me
should be not too difficult to setup using a couple of web pages
running on localhost e socket
hope help
2005/9/20, Vinicius Mapelli Schmaedek [EMAIL PROTECTED]:
Somebody knows a chat module to be used for conversation between only
two people?
PS: sorry, my english is not very good :P
Hi All,
My very first post to this group as I'm a freshly spanked new born php
baby. Hope I have the correct stop for noob tech questions. Please
re-direct me if I have it wrong. I've been doing web dev for a quite while
with a variety of methods (html, xhtml/css, cfml, flash/as, on and
On Tue, 2005-09-20 at 18:41, jay thompson wrote:
Hi All,
My very first post to this group as I'm a freshly spanked new born php
baby. Hope I have the correct stop for noob tech questions. Please
[-- SNP --]
Try verifying your include path in php.ini for the NT version.
well I did it in the past, at the end after a lot of tests and
simulation i decided for
warehouse table
id_hotel, date, num_total_rooms, num_booked_rooms
this is day by day handling it is really flexible you can satisfy each
kind of request with very
simple queries
you also gain more
jay thompson said the following on 09/20/05 15:41:
My problem occurs only on the server (NT 5 b.2195, PHP 4.3.10, IIS 5.0) but
works great on my dev rig (XAMPP 1.4.15, VectorLinux).
At first guess I'd say register globals is on for your test rig and off
for your server.
Since your variables
Hi All,
My very first post to this group as I'm a freshly spanked new born
php
baby. Hope I have the correct stop for noob tech questions.
Welcome :)
[source]
First guess: On your live server the ini-value error_reporting is switched
to report anything but notices and warnings or
jay thompson wrote:
index.php:
?php
include 'content.php'; //sets the section title
echo $title;
?
?php
include 'navigate.php'; //sets appropriate navigation menu
echo $navigate;
?
?php
echo $content; //loads body text
?
There is no need to switch
On Tue, 2005-09-20 at 19:14, Thorsten Suckow-Homberg wrote:
Hi All,
My very first post to this group as I'm a freshly spanked new born
php
baby. Hope I have the correct stop for noob tech questions.
Welcome :)
[source]
First guess: On your live server the ini-value
hy guys this night I'm quite tired
I need a little tip
ok var n could be from 0 to 12
var f must be set
f=1 if0n=4
f=2 if 5n=7
f=3 if 8n=12
f=4 if n12
due to my fatigue I coded four if-if else statement,
in other languages it is possible use conditional epression in switch case
like
On Tue, 2005-09-20 at 19:20, adriano ghezzi wrote:
hy guys this night I'm quite tired
I need a little tip
ok var n could be from 0 to 12
var f must be set
f=1 if0n=4
f=2 if 5n=7
f=3 if 8n=12
f=4 if n12
due to my fatigue I coded four if-if else statement,
in other
Thanks Thorsten and Rob,
Sry my bogus code was error filled. This is not the case with the
actual
code. I was a little quick in removing the large amounts of text that are
actually contained in the cases and case 1,2,3: is just to say there are
many more cases. Could this be a problem
in other languages it is possible use conditional epression in switch
case
like
switch $n
case (0n=4):
but no in php
You could use the following statement:
?php
switch (true) {
case (0 $n = 4):
$f = 1;
break;
case (5 $n = 7):
$f = 2;
break;
case (8 $n = 12):
$f = 3;
break;
On Tue, 2005-09-20 at 19:41, jt wrote:
Thanks Thorsten and Rob,
Sry my bogus code was error filled. This is not the case with the
actual
code. I was a little quick in removing the large amounts of text that are
actually contained in the cases and case 1,2,3: is just to say there are
1 - 100 of 124 matches
Mail list logo