Re: [PHP] Re: PHP vs Delphi Comparison?

2007-07-03 Thread Nathan Nobbe

On 7/3/07, Darren Whitlen <[EMAIL PROTECTED]> wrote:
One is compiled, and for desktop software...


actually the last 2 revisions of delphi are based on the .net framework, and
as such there is support for ASP.NET

-nathan

On 7/3/07, Darren Whitlen <[EMAIL PROTECTED]> wrote:


Dan wrote:
> I'm looking for a way to introduce PHP to some Delphi programmers, so I
> thought a comparison would show them the major differences, but I can't
> find anything like that on the web.  Anyone have an article like that or
> know of one?
>
> - Dan

There's a HUGE list of differences, as they are 2 completely different
languages designed for completely different reasons. One is compiled,
and for desktop software, while the other is scripted and designed to
only output text.

It really is like comparing apples to oranges.

Darren

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Richard Lynch


On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
> On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
>> I think I have to answer to this one: 'If at first you don't succeed
>> try,
>> try again'.
>
> Here's another one...
>
> 
> $x = rand( 1, 20 );
> for( $i = 0; $i < $x; $i++ );
> while( --$i > 0 );
>
> ?>

Didn't see an answer to this one...

So I'll double-whammy it with a "Name That Tune" factor:

wheel = 'roun\'';
 }
  }
  while($wheel = new Thread());
?>

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail function problem

2007-07-03 Thread web2

Daniel Brown a écrit :

On 7/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Daniel Brown a écrit :
> On 7/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> I've already checked :
>>
>> - the mail logs : no mail send
>>
>> - and the apache error and access logs : nothing except this :
>>
>> 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET /~ee/mail.php
>> HTTP/1.1" 200 49291 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr;
>> rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4"
>> 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET
>> /~ee/mail.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 
HTTP/1.1" 200
>> 2524 "http://mysite.domain.do/~ee/mail.php"; "Mozilla/5.0 
(Windows;

>> U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4"
>> 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET
>> /~ee/mail.php?=SUHO8567F54-D428-14d2-A769-00DA302A5F18 
HTTP/1.1" 200
>> 2813 "http://mysite.domain.do/~ee/mail.php"; "Mozilla/5.0 
(Windows;

>> U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4"
>> 192.168.0.1 - - [02/Jul/2007:14:07:22 +0200] "GET
>> /~ee/mail.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 
HTTP/1.1" 200
>> 2146 "http://mysite.domain.do/~ee/mail.php"; "Mozilla/5.0 
(Windows;

>> U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4"
>>
>>
>>
>> Chris a écrit :
>> > [EMAIL PROTECTED] wrote:
>> >> Hi,
>> >>
>> >> I'm running PHP 5.2.3 on Solaris 10 (AMD64).
>> >>
>> >> My mail function doesn't send any mail, the return value of mail
>> >> function is false...
>> >> But sendmail_path value is OK in php.ini, and I've tried to send a
>> >> mail with sendmail on console with the same user (the apache 
user),

>> >> and everything's ok...
>> >>
>> >> Does anyone have solution ?
>> >
>> > Check your mail logs and your apache logs to see if any errors are
>> > showing up.
>> >
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>Is it possible for you to provide your code so that we can take a
> look at it for you?
>

Yes, my PHP test code is :





Try this:


   Note


Same result : "NOK /usr/lib/sendmail -t -i"
I think the problem is not in the test script.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Disadvantages of output buffering

2007-07-03 Thread Richard Lynch
On Tue, June 26, 2007 8:54 am, Robin Vickery wrote:

CON:

On a dev server, when you screw up and write an infinite loop, PHP
spends a hell of a lot more time spinning its wheels before you kill
it because your infinitely long output is all buffered up.

[innocent voice]
Not that that has ever happened to me, oh no.
[/innocent]

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Create .php file with php

2007-07-03 Thread Richard Lynch
On Mon, June 25, 2007 7:13 pm, Marius Toma wrote:
> I can not create .php files from PHP. I can save them as *.php5,
> *.php3,
> asp, *.txt , etc... but not as .php. I tried both touch and fopen but
> none of them worked.
>
> I'm running PHP 5.1.6 on Apache 2, safe_mode is off
>
> Is this a security measure somewhere? How can I bypass it?

There is nothing whatsoever in PHP nor Apache to stop you from writing
files whose names happen to end in .php

Whatever else you did differently for the .php files is what messed
you up, not the filenames.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Disadvantages of output buffering

2007-07-03 Thread Richard Lynch
On Tue, June 26, 2007 7:33 am, Emil Edeholt wrote:

> My php project would get a much cleaner code if I could set cookies
> anywhere in the code. So I thought of output buffering. But I can't
> find
> any articles on the cons of output buffering. I mean it most be a
> reason
> for it being off by default?

Main reason to be off by default is backwards compatibility.

Depending on your PHP, HTML and/or CSS and browser rendering, output
buffering can also make a site "seem" slow since it buffers up all the
output until the page is complete.

But you'd have to have some pretty heavy lifting in PHP buried in the
middle of the HTML output for that to be meaningful.  That's usually a
bad Design decision, but there might be some cases where it's
relevant.

There also have been a lot of benchmarks to prove buffering was
better/worse/faster/slower.  You're on your own about which ones to
believe.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] simple OCR in php

2007-07-03 Thread Andrei
Richard Lynch wrote:
> On Sat, June 30, 2007 12:12 pm, Jay Blanchard wrote:
>   
>> [snip]
>> 
>>> In short PHP cannot perform OCR functions.
>>>   
>> Why? PHP provides all requisite functions/features so if someone was
>> sadistic enough and talented enough there's nothing to stop them
>> writing
>>
>> an OCR app using it.
>> [/snip]
>>
>> Sure, but then the scanning device would have to be connected to the
>> server. I suppose you could open a socket and stream the information
>> to
>> the server and then have PHP read and interpret the stream as it
>> arrives. See how complex this is becoming?
>> 
>
> No, the scanning device could be on a desktop that builds a folder of
> files with names that can be tied back to the documents somehow.
>
> Or, for what the OP asked for, the whole thing could be on a "server"
> which is really a "desktop" where having the scanner connected would
> be pretty normal.
>   
It's better to focus on OCR code which reads and parses an image
file (usually tiff file). Obtaining the image is not that hard (at least
on linux).

   Andy


[PHP] how PHP is batter?

2007-07-03 Thread Muhammad Hassan Samee

ASP.net VS PHP?

how PHP is batter?


Re: [PHP] how PHP is batter?

2007-07-03 Thread Tobias Zander

batter like batman?

Muhammad Hassan Samee schrieb:

ASP.net VS PHP?

how PHP is batter?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Andrei

Muhammad Hassan Samee wrote:
> ASP.net VS PHP?
>
> how PHP is batter?
>
> .
>
In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: how PHP is batter?

2007-07-03 Thread Colin Guthrie
Muhammad Hassan Samee wrote:
> ASP.net VS PHP?
> 
> how PHP is batter?

I think you mean "Why is PHP better?" :p (batter is what you make
pancakes out of, or if you are in Scotland it's means to get beaten up -
e.g. "I'll batter you, ya wee radge" :p)

To answer the question tho', it's really down to personal taste IMO.

I much prefer free software and the philosophies around that area (even
if I do develop closed code!) I don't see *why* I should pay a
monopolistic company with questionable business and ethical tactics to
run by business.

I also like the fact that there are loads of PHP examples and
applications out there that you can incorporate into your solutions
(depending on license). Not to say this doesn't apply to ASP too but it
seems more obvious with PHP).

In terms of language/syntactical comparisons, well there are lots of
websites out there that can probably tell you that.

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] calling parent class method from the outside

2007-07-03 Thread Jochem Maas
admin wrote:
> Jochem Maas wrote:

...

>>
>> the 'callback' type has a number of forms:
>>
>> 'myFunc'
>> array('className', 'myMeth')
>> array(self, 'myMeth')
>> array(parent, 'myMeth')
>> array($object, 'myMeth')
>>
>> self and parent adhere to the same 'context' rules when used in
>> call_user_func*()
>> as when you use them directly - whether $this is present within the
>> scope of the
>> called method is essentially down to whether the method being called
>> is defined as
>> static or not. AFAIK call_user_func*() respects PPP modifiers and
>> works transparently
>> with regard to access to the relevant object variable ($this)
>>
> 
> This undocumented (?) feature is fairly nice.

it is documented - where do you think I find out about it?

> Unfortunately there's no $this outside the class.

this seems painfully obvious - not sure why this is a problem
it's not like $this is javascript.

> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] calling parent class method from the outside

2007-07-03 Thread admin

Jochem Maas wrote:

admin wrote:

Jochem Maas wrote:


...


the 'callback' type has a number of forms:

'myFunc'
array('className', 'myMeth')
array(self, 'myMeth')
array(parent, 'myMeth')
array($object, 'myMeth')

self and parent adhere to the same 'context' rules when used in
call_user_func*()
as when you use them directly - whether $this is present within the
scope of the
called method is essentially down to whether the method being called
is defined as
static or not. AFAIK call_user_func*() respects PPP modifiers and
works transparently
with regard to access to the relevant object variable ($this)


This undocumented (?) feature is fairly nice.


it is documented - where do you think I find out about it?



I knew it could be, and it is described at the top: 
http://www.php.net/manual/en/language.oop5.basic.php

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: how PHP is batter?

2007-07-03 Thread Richard Heyes

Colin Guthrie wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?


I think you mean "Why is PHP better?" :p (batter is what you make
pancakes out of, or if you are in Scotland it's means to get beaten up -
e.g. "I'll batter you, ya wee radge" :p)


"radge" ?

What's that in English :) ?

--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Calendar booking form in PHP/MySQL

2007-07-03 Thread Timothy Murphy
I'm looking for a PHP/MySQL "calendar booking form",
which I am sure must have been done a million times.

This will show a calendar on the web mirroring a MySQL table.
Each entry in the MySQL table will show two dates, Start and End.
The dates between these should be shown in red on the calendar.

Any pointers or scipts or suggestions gratefully received.

-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: how PHP is batter?

2007-07-03 Thread Colin Guthrie
Richard Heyes wrote:
> Colin Guthrie wrote:
>> Muhammad Hassan Samee wrote:
>>> ASP.net VS PHP?
>>>
>>> how PHP is batter?
>>
>> I think you mean "Why is PHP better?" :p (batter is what you make
>> pancakes out of, or if you are in Scotland it's means to get beaten up -
>> e.g. "I'll batter you, ya wee radge" :p)
> 
> "radge" ?
> 
> What's that in English :) ?
> 

I guess "Crazy" or "Crazy Person" depending on context.

e.g.

"Ya radge" == "You Crazy Person".

"She's pure radge!" == "She is crazy!"

Either phrase can be a good or a bad thing, it all depends on tone -
Scottish is very like Japanese in that respect :p

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: how PHP is batter?

2007-07-03 Thread George Pitcher
Colin,

> Either phrase can be a good or a bad thing, it all depends on tone -
> Scottish is very like Japanese in that respect :p
> 
Nips are good, but drams are better!

George

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: implementation of guest book

2007-07-03 Thread Joker7
In news: [EMAIL PROTECTED] - Shiv Prakash
wrote :
>> Sir,
>>
>>  I have implemented the guest book in web site successfully and its
>> working also without any problem but administration side is asking
>> for ID and Password, my request is how do I get that because I have
>> tried my level best to find it in the site but I couldn't get it
>> ,there was not any option for that and as of downloading is concern
>> it was free, therefore I request you to help me out of this and
>> solve my problem,
>>
>>  Thank you
>>
>>  Shiv Prakash
>>  Email Id 2. [EMAIL PROTECTED]

What script and where did you download it ?

Chris

-- 
Cheap As Chips Broadband http://yeah.kick-butt.co.uk
Superb hosting & domain name deals http://host.kick-butt.co.uk 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: how PHP is batter?

2007-07-03 Thread Jochem Maas
Colin Guthrie wrote:
> Richard Heyes wrote:
>> Colin Guthrie wrote:
>>> Muhammad Hassan Samee wrote:
 ASP.net VS PHP?

 how PHP is batter?
>>> I think you mean "Why is PHP better?" :p (batter is what you make
>>> pancakes out of, or if you are in Scotland it's means to get beaten up -
>>> e.g. "I'll batter you, ya wee radge" :p)
>> "radge" ?
>>
>> What's that in English :) ?
>>
> 
> I guess "Crazy" or "Crazy Person" depending on context.
> 
> e.g.
> 
> "Ya radge" == "You Crazy Person".
> 
> "She's pure radge!" == "She is crazy!"
> 
> Either phrase can be a good or a bad thing, it all depends on tone -
> Scottish is very like Japanese in that respect :p

with regard to batter - isn't it the scots that have pechant for covering
marsbars with the stuff and deepfrying them?

with regard to php v. asp.net - does asp.net have such a funny mailing list? ;-)

> 
> Col
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jason Pruim

Hi Everyone!

Okay, so for those of you who remember I have been going back and  
forth on how to write a reoccuring task manager program for my  
office, it's a little bit a labor of love, little bit wanting to  
expand my knowledge.


Anyway, I've hit a problem... I am attempting to add away to  
reschedule tasks based on a value entered in a text box (IE: 7/3/07)  
and then create a timestamp off of that so that I can have it show up  
on that date.


The problem comes in when I try and submit the values to the update  
form, as of right now, it only picks up the info in the bottom text  
box and updates it None of the others, no matter how many/few I  
have selected to update.


I think I need to put the text boxes into an array (And possibly the  
check boxes as well) but I have never done that before for text  
boxes.. Is it as easy as textbox[] to create an array of text boxes?  
Or is there something else that I'm missing?


Here is some of the code:

$result = mysql_query($sql);
echo "";
echo "";
echo "
ID #
Tickler Name
Tickler Description
Completed
 Day to complete
Reschedule Date
";

while($row = mysql_fetch_array($result)) {


echo "ID#, $row[0] ";// ID #
	echo "TicklerName, $row[1]  ";//  
Tickler Name
	echo "Instructions, Instructions";// Instructions
	echo "DayOfWeekWord, $dowword ";//  
Day of week word
	echo "DateToReschedule, name='txtReschedule' value=''>";//Date to reschedule
	echo "DateRescheduled, $Date";//Date  
stored in timeStamp
//	echo "Click here!";
	echo "CheckboxForWhenDone, type='checkbox' name='chkDone' value='$row[0]'>";//Check box for when  
completed


}

and the update form:

$taskdate1= $_POST['txtReschedule'];
$taskDone = $_POST['chkDone'];
$taskTime=mktime($taskdate1);

//	$sql="UPDATE tasks SET completed='1', timeStamp='$taskdate1' where  
id='$taskid' LIMIT 1;";
	$sql="update tasks set completed='1', timeStamp='$taskTime' where  
id='$taskDone' LIMIT 1;";


mysql_query($sql) or die(mysql_error());


Any help with this would be greatly appreciated! :)

Jason Pruim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: how PHP is batter?

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 15:08 +0200, Jochem Maas wrote:
>
> with regard to php v. asp.net - does asp.net have such a funny mailing list? 
> ;-)

Probably not... you need to start with a sense of humour :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 09:30 -0400, Jason Pruim wrote:
> Hi Everyone!
>
> Here is some of the code:
> 
> $result = mysql_query($sql);
> echo "";
> echo "";
> echo "
> ID #
> Tickler Name
> Tickler Description
> Completed
>  Day to complete
> Reschedule Date
> ";
> 
> while($row = mysql_fetch_array($result)) {
> 
> 
>   echo "ID#, $row[0] ";// ID #
>   echo "TicklerName, $row[1]  ";//  
> Tickler Name
>   echo "Instructions, Instructions";// Instructions
>   echo "DayOfWeekWord, $dowword ";//  
> Day of week word
>   echo "DateToReschedule,  name='txtReschedule' value=''>";//Date to reschedule
>   echo "DateRescheduled, $Date";//Date  
> stored in timeStamp
> //echo "Click here!";
>   echo "CheckboxForWhenDone,  type='checkbox' name='chkDone' value='$row[0]'>";//Check box for when  
> completed
> 
> }

Oh man, blast from the past... BLAST FROM THE PAST!!! Where did you dig
up such ancient HTML? I'm taking a walk down nostalgia lane.
Unfortunately it's making me nauseous as I remember the original trip. I
guess you could call it naustalgia! >:)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP vs Delphi Comparison?

2007-07-03 Thread Stut

Darren Whitlen wrote:

Dan wrote:
I'm looking for a way to introduce PHP to some Delphi programmers, so 
I thought a comparison would show them the major differences, but I 
can't find anything like that on the web.  Anyone have an article like 
that or know of one?


- Dan


There's a HUGE list of differences, as they are 2 completely different 
languages designed for completely different reasons. One is compiled, 
and for desktop software, while the other is scripted and designed to 
only output text.


It really is like comparing apples to oranges.


I must disagree with that. Firstly, most programming languages share 
similar constructs and can therefore be compared at the syntax level 
regardless of the intended purpose. Secondly Delphi was not designed for 
"desktop software" - I've developed many a Windows service with it.


Lastly, and most importantly, you mean interpreted not scripted and PHP 
was in no way specifically designed for nor is it limited to outputting 
text only.


Darren: Set yourself free and stop imposing artificial limits on technology.

Dan: A more logical comparison would be Pascal against PHP since the 
whole IDE aspect that Delphi adds to Pascal, and the control library, 
are not really relevant to any sensible comparison. However, as far as 
the control library goes the closest thing PHP has would be PEAR.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jason Pruim


On Jul 3, 2007, at 9:47 AM, Robert Cummings wrote:


On Tue, 2007-07-03 at 09:30 -0400, Jason Pruim wrote:

Hi Everyone!

Here is some of the code:

$result = mysql_query($sql);
echo "";
echo "";
echo "
ID #
Tickler Name
Tickler Description
Completed
 Day to complete
Reschedule Date
";

while($row = mysql_fetch_array($result)) {


echo "ID#, $row[0] ";// ID #
echo "TicklerName, $row[1]  ";//
Tickler Name
echo "Instructions, Instructions";// Instructions
echo "DayOfWeekWord, $dowword ";//
Day of week word
echo "DateToReschedule, ";//Date to reschedule
echo "DateRescheduled, $Date";//Date
stored in timeStamp
//  echo "Click here!";
echo "CheckboxForWhenDone, ";//Check box for when
completed

}


Oh man, blast from the past... BLAST FROM THE PAST!!! Where did you  
dig

up such ancient HTML? I'm taking a walk down nostalgia lane.
Unfortunately it's making me nauseous as I remember the original  
trip. I

guess you could call it naustalgia! >:)


But what I'm displaying is tabular data on my internal network :) so  
I can use an old table for it. Once I get it working properly I'll  
probably change the table into div's... Haven't decided yet :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Stut

Andrei wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?

.


In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.


You have never needed to buy anything to develop ASP.net applications.

And if you feel the need for a nice IDE, Visual Studio Web Developer 
Express Edition is available for free...


http://msdn.microsoft.com/vstudio/express/vwd/

Stop the FUD!

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 09:52 -0400, Jason Pruim wrote:
> On Jul 3, 2007, at 9:47 AM, Robert Cummings wrote:
> 
> > On Tue, 2007-07-03 at 09:30 -0400, Jason Pruim wrote:
> >> Hi Everyone!
> >>
> >> Here is some of the code:
> >>
> >> $result = mysql_query($sql);
> >> echo "";
> >> echo "";
> >> echo "
> >> ID #
> >> Tickler Name
> >> Tickler Description
> >> Completed
> >>  Day to complete
> >> Reschedule Date
> >> ";
> >>
> >> while($row = mysql_fetch_array($result)) {
> >>
> >>
> >>echo "ID#, $row[0] ";// ID #
> >>echo "TicklerName, $row[1]  ";//
> >> Tickler Name
> >>echo "Instructions, Instructions";// Instructions
> >>echo "DayOfWeekWord, $dowword ";//
> >> Day of week word
> >>echo "DateToReschedule,  >> name='txtReschedule' value=''>";//Date to reschedule
> >>echo "DateRescheduled, $Date";//Date
> >> stored in timeStamp
> >> // echo "Click here!";
> >>echo "CheckboxForWhenDone,  >> type='checkbox' name='chkDone' value='$row[0]'>";//Check box for when
> >> completed
> >>
> >> }
> >
> > Oh man, blast from the past... BLAST FROM THE PAST!!! Where did you  
> > dig
> > up such ancient HTML? I'm taking a walk down nostalgia lane.
> > Unfortunately it's making me nauseous as I remember the original  
> > trip. I
> > guess you could call it naustalgia! >:)
> 
> But what I'm displaying is tabular data on my internal network :) so  
> I can use an old table for it. Once I get it working properly I'll  
> probably change the table into div's... Haven't decided yet :)

Nothing wrong with tables... it's the mish-mash of lowercase/uppercase
tag/attribute names and the use of bgcolor instead of CSS :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 14:52 +0100, Stut wrote:
> Andrei wrote:
> > Muhammad Hassan Samee wrote:
> >> ASP.net VS PHP?
> >>
> >> how PHP is batter?
> >>
> >> .
> >>
> > In short words it's not Micro$oft and you don't need to buy stuff to
> > develop in it.
> 
> You have never needed to buy anything to develop ASP.net applications.
> 
> And if you feel the need for a nice IDE, Visual Studio Web Developer 
> Express Edition is available for free...
> 
> http://msdn.microsoft.com/vstudio/express/vwd/
> 
> Stop the FUD!

Microsoft started it! As the adage goes... "People in glass houses
shouldn't throw stones" :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jason Pruim


On Jul 3, 2007, at 9:58 AM, Robert Cummings wrote:



Oh man, blast from the past... BLAST FROM THE PAST!!! Where did you
dig
up such ancient HTML? I'm taking a walk down nostalgia lane.
Unfortunately it's making me nauseous as I remember the original
trip. I
guess you could call it naustalgia! >:)


But what I'm displaying is tabular data on my internal network :) so
I can use an old table for it. Once I get it working properly I'll
probably change the table into div's... Haven't decided yet :)


Nothing wrong with tables... it's the mish-mash of lowercase/uppercase
tag/attribute names and the use of bgcolor instead of CSS :)


I'll add the CSS once I can get the form to work properly, and can  
figure out how to change the color with css based on a certain value  
stored in a database IE: $rowColor :)


To the point of the email though, is it just as simple as typing  
textbox[] and I have an array from the text boxes? :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Andrei

Jason Pruim wrote:
>
> On Jul 3, 2007, at 9:47 AM, Robert Cummings wrote:
>
>> On Tue, 2007-07-03 at 09:30 -0400, Jason Pruim wrote:
>>> Hi Everyone!
>>>
>>> Here is some of the code:
>>>
>>> $result = mysql_query($sql);
>>> echo "";
>>> echo "";
>>> echo "
>>> ID #
>>> Tickler Name
>>> Tickler Description
>>> Completed
>>>  Day to complete
>>> Reschedule Date
>>> ";
>>>
>>> while($row = mysql_fetch_array($result)) {
>>>
>>>
>>> echo "ID#, $row[0] ";// ID #
>>> echo "TicklerName, $row[1]  ";//
>>> Tickler Name
>>> echo "Instructions, Instructions";// Instructions
>>> echo "DayOfWeekWord, $dowword ";//
>>> Day of week word
>>> echo "DateToReschedule, >> type='text'
>>> name='txtReschedule' value=''>";//Date to reschedule
>>> echo "DateRescheduled, $Date";//Date
>>> stored in timeStamp
>>> //echo ">> href='update.php?taskid=$row[0]
>>> &taskdate=$taskdate'>Click here!";
>>> echo "CheckboxForWhenDone, >> type='checkbox' name='chkDone' value='$row[0]'>";//Check box for when
>>> completed
>>>
>>> }
>>
>> Oh man, blast from the past... BLAST FROM THE PAST!!! Where did you dig
>> up such ancient HTML? I'm taking a walk down nostalgia lane.
>> Unfortunately it's making me nauseous as I remember the original trip. I
>> guess you could call it naustalgia! >:)
>
> But what I'm displaying is tabular data on my internal network :) so I
> can use an old table for it. Once I get it working properly I'll
> probably change the table into div's... Haven't decided yet :)
>
> --PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Anyway you should get rid of echoing everything from php... It really
gets you mad when you want to change things...
Do it like:

while($row = mysql_fetch_array($result))
{
?>
   
ID#, 
TicklerName, 
etc...
   
   http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: how PHP is batter?

2007-07-03 Thread Colin Guthrie
Jochem Maas wrote:
> with regard to batter - isn't it the scots that have pechant for covering
> marsbars with the stuff and deepfrying them?

Hehe yeah we do have a reputation for that tho' I only know of one place
in my city where they will do that for you as it can mess up your frying
oil apparently!! I've had one once when I was in my younger days. Pretty
nasty. :p

> with regard to php v. asp.net - does asp.net have such a funny mailing list? 
> ;-)

Case closed :D

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread John Meyer
Muhammad Hassan Samee wrote:
> ASP.net VS PHP?
>
> how PHP is batter?
>

Without context that question is meaningless and only serves as troll bait.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
> 
> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
> > On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
> >> I think I have to answer to this one: 'If at first you don't succeed
> >> try,
> >> try again'.
> >
> > Here's another one...
> >
> >  >
> > $x = rand( 1, 20 );
> > for( $i = 0; $i < $x; $i++ );
> > while( --$i > 0 );
> >
> > ?>
> 
> Didn't see an answer to this one...

It was pretty simple... "What goes up must come down." :)

> So I'll double-whammy it with a "Name That Tune" factor:
> 
>class Thread {
>  var $wheel;
>  function Thread (){
>$this->wheel = 'roun\'';
>  }
>   }
>   while($wheel = new Thread());
> ?>


Bleh, I'm stuck :B

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Disadvantages of output buffering

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 02:23 -0500, Richard Lynch wrote:
> On Tue, June 26, 2007 8:54 am, Robin Vickery wrote:
> 
> CON:
> 
> On a dev server, when you screw up and write an infinite loop, PHP
> spends a hell of a lot more time spinning its wheels before you kill
> it because your infinitely long output is all buffered up.
> 
> [innocent voice]
> Not that that has ever happened to me, oh no.
> [/innocent]

I'm sorry but your SQUAREML is poorly formed. I was unable to parse your
message. Please resend according to webservice specs.

;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Swear filter ideas

2007-07-03 Thread John Meyer
Richard Lynch wrote:
> Don't.
>
> Trying to solve a social problem with software hacks never works out
> well.
>
> :-)
>
>   

Taking the emotion out of this, if you wanted to catch any list of words
(the Esperanto dictionary, the words to that last song that got ground
into your head), how would you do it?  I agree unless you get a really
good fuzzy logic algorithm going, you're never going to be able to do it
100 percent.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] how PHP is batter?

2007-07-03 Thread Jay Blanchard
[snip]
ASP.net VS PHP?
[/snip]

The bottom line is that you must choose the best tool for the job. In
other words your shouldn't drive a nail with a band saw. Each has their
own strengths and weaknesses. IMHO the learning curve with PHP is much
less steep and PHP code lends itself towards more elegance.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Stut

Robert Cummings wrote:

On Tue, 2007-07-03 at 14:52 +0100, Stut wrote:

Andrei wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?

.


In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.

You have never needed to buy anything to develop ASP.net applications.

And if you feel the need for a nice IDE, Visual Studio Web Developer 
Express Edition is available for free...


http://msdn.microsoft.com/vstudio/express/vwd/

Stop the FUD!


Microsoft started it! As the adage goes... "People in glass houses
shouldn't throw stones" :)


You know very well that just because someone else does something it 
doesn't make it right. Don't sink to their level.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 10:06 -0400, Jason Pruim wrote:
> On Jul 3, 2007, at 9:58 AM, Robert Cummings wrote:
> 
> >>>
> >>> Oh man, blast from the past... BLAST FROM THE PAST!!! Where did you
> >>> dig
> >>> up such ancient HTML? I'm taking a walk down nostalgia lane.
> >>> Unfortunately it's making me nauseous as I remember the original
> >>> trip. I
> >>> guess you could call it naustalgia! >:)
> >>
> >> But what I'm displaying is tabular data on my internal network :) so
> >> I can use an old table for it. Once I get it working properly I'll
> >> probably change the table into div's... Haven't decided yet :)
> >
> > Nothing wrong with tables... it's the mish-mash of lowercase/uppercase
> > tag/attribute names and the use of bgcolor instead of CSS :)
> 
> I'll add the CSS once I can get the form to work properly, and can  
> figure out how to change the color with css based on a certain value  
> stored in a database IE: $rowColor :)

At it's simplest:

''

Though I would advise using a more descriptive name. Additionally some
advice... try to limit your global classes. Instea dof having:

td.someClass
{
background-color: #dd;
}

Try something more specific:

table.specialInformation td.someClass
{
background-color: #dd;
}


> To the point of the email though, is it just as simple as typing  
> textbox[] and I have an array from the text boxes? :)

Yes, but only if one or more checkboxes get checked. Unchecked
checkboxes are not sent to the server by the browser. So you need at
leas one to have an array, but you can just check for existence of your
incoming data before attempting to access array indexes.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 15:07 +0100, Stut wrote:
> Robert Cummings wrote:
> > On Tue, 2007-07-03 at 14:52 +0100, Stut wrote:
> >> Andrei wrote:
> >>> Muhammad Hassan Samee wrote:
>  ASP.net VS PHP?
> 
>  how PHP is batter?
> 
>  .
> 
> >>> In short words it's not Micro$oft and you don't need to buy stuff to
> >>> develop in it.
> >> You have never needed to buy anything to develop ASP.net applications.
> >>
> >> And if you feel the need for a nice IDE, Visual Studio Web Developer 
> >> Express Edition is available for free...
> >>
> >> http://msdn.microsoft.com/vstudio/express/vwd/
> >>
> >> Stop the FUD!
> > 
> > Microsoft started it! As the adage goes... "People in glass houses
> > shouldn't throw stones" :)
> 
> You know very well that just because someone else does something it 
> doesn't make it right. Don't sink to their level.

:)


-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP vs Delphi Comparison?

2007-07-03 Thread Darren Scales

On 03/07/07, Stut <[EMAIL PROTECTED]> wrote:


Darren Whitlen wrote:
> Dan wrote:
>> I'm looking for a way to introduce PHP to some Delphi programmers, so
>> I thought a comparison would show them the major differences, but I
>> can't find anything like that on the web.  Anyone have an article like
>> that or know of one?
>>
>> - Dan
>
> There's a HUGE list of differences, as they are 2 completely different
> languages designed for completely different reasons. One is compiled,
> and for desktop software, while the other is scripted and designed to
> only output text.
>
> It really is like comparing apples to oranges.

I must disagree with that. Firstly, most programming languages share
similar constructs and can therefore be compared at the syntax level
regardless of the intended purpose. Secondly Delphi was not designed for
"desktop software" - I've developed many a Windows service with it.



Fair enough, syntax you can compare. By "desktop software" (OK bad
terminology by me there) I mean full blown apps like an office suite,
photoshop or a music composition app for example. Creating such an app using
PHP just wouldn't be possible without a LOT of serious work, most likely
using C for extra extensions.

Lastly, and most importantly, you mean interpreted not scripted and PHP

was in no way specifically designed for nor is it limited to outputting
text only.



Yes, I do mean interpreted. Honestly, I've tried and am still trying to use
PHP as an all round language. But unlike delphi, it just can't output a
native GUI on each OS. This leaves it outputting only text (either via CLI
or embeded into a webpage). Yes OK it can output graphics using GD by
writing it to files, but then you have to have another app to display the
image.

Darren: Set yourself free and stop imposing artificial limits on technology.


I'm hoping that explaining I have tied to use PHP in other ways might make
you take that back ;)

Darren

Dan: A more logical comparison would be Pascal against PHP since the

whole IDE aspect that Delphi adds to Pascal, and the control library,
are not really relevant to any sensible comparison. However, as far as
the control library goes the closest thing PHP has would be PEAR.

-Stut

--
http://stut.net/



Re: Re: [PHP] how PHP is batter?

2007-07-03 Thread Andrei

Stut wrote:
> Andrei wrote:
>> Muhammad Hassan Samee wrote:
>>> ASP.net VS PHP?
>>>
>>> how PHP is batter?
>>>
>>> .
>>>
>> In short words it's not Micro$oft and you don't need to buy stuff to
>> develop in it.
>
> You have never needed to buy anything to develop ASP.net applications.
>
> And if you feel the need for a nice IDE, Visual Studio Web Developer
> Express Edition is available for free...
>
> http://msdn.microsoft.com/vstudio/express/vwd/
>
> Stop the FUD!
>
> -Stut
>
I saw there is a free version of Studio, but I think it's for
students... You cannot go build a corporate project with it I think...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] looking for a good gateway - php

2007-07-03 Thread Ross
Hi All,


Worldpay is far too expensive.I am looking for a good gateway that.

-has a good php/linux sdk
-easy to integrate
-does not open new windows with the gateways logo all over the place but is 
contained on my site
- has good rates
- does not take ages to get the cash from your account to your bank 
account(paypal)


Any recommendations are most appreciated,


R.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
>
> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
> > On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
> >> I think I have to answer to this one: 'If at first you don't succeed
> >> try,
> >> try again'.
> >
> > Here's another one...
> >
> >  >
> > $x = rand( 1, 20 );
> > for( $i = 0; $i < $x; $i++ );
> > while( --$i > 0 );
> >
> > ?>
>
> Didn't see an answer to this one...

It was pretty simple... "What goes up must come down." :)

> So I'll double-whammy it with a "Name That Tune" factor:
>
>class Thread {
>  var $wheel;
>  function Thread (){
>$this->wheel = 'roun\'';
>  }
>   }
>   while($wheel = new Thread());
> ?>


Bleh, I'm stuck :B

Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   "The wheel goes roun and roun" [sic]

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Jochem Maas
John Meyer wrote:
> Muhammad Hassan Samee wrote:
>> ASP.net VS PHP?
>>
>> how PHP is batter?
>>
> 
> Without context that question is meaningless and only serves as troll bait.

do trolls eat deepfried marsbars by any chance? it would explain alot :-P

> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
> >
> > On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
> > > On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
> > >> I think I have to answer to this one: 'If at first you don't succeed
> > >> try,
> > >> try again'.
> > >
> > > Here's another one...
> > >
> > >  > >
> > > $x = rand( 1, 20 );
> > > for( $i = 0; $i < $x; $i++ );
> > > while( --$i > 0 );
> > >
> > > ?>
> >
> > Didn't see an answer to this one...
>
> It was pretty simple... "What goes up must come down." :)
>
> > So I'll double-whammy it with a "Name That Tune" factor:
> >
> >  >   class Thread {
> >  var $wheel;
> >  function Thread (){
> >$this->wheel = 'roun\'';
> >  }
> >   }
> >   while($wheel = new Thread());
> > ?>
>
>
> Bleh, I'm stuck :B
>
> Cheers,
> Rob.
> --
> ..
> | InterJinn Application Framework - http://www.interjinn.com |
> ::
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for   |
> | creating re-usable components quickly and easily.  |
> `'
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

"The wheel goes roun and roun" [sic]

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107



   A similar one:




--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 10:36 -0400, Daniel Brown wrote:
>
> 
> A similar one:
> 
>  function sing($ignore) {
> echo "It's a song!\n";
> }
> 
> (float) $bus;
> $bus = 14.750;
> while($wheels = round($bus,2)) {
> sing($wheels);
> }
> ?>

Well when you say it like that... you trigger my kid friendly singing
side that I picked up while bringing my son to playgroup :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Tue, 2007-07-03 at 10:36 -0400, Daniel Brown wrote:
>
>
> A similar one:
>
>  function sing($ignore) {
> echo "It's a song!\n";
> }
>
> (float) $bus;
> $bus = 14.750;
> while($wheels = round($bus,2)) {
> sing($wheels);
> }
> ?>

Well when you say it like that... you trigger my kid friendly singing
side that I picked up while bringing my son to playgroup :)


   Ha!  Kids will do that to ya', that's for sure!

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: how PHP is batter?

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 12:10 +0100, Colin Guthrie wrote:
> Muhammad Hassan Samee wrote:
> > ASP.net VS PHP?
> > 
> > how PHP is batter?
> 
> I think you mean "Why is PHP better?" :p (batter is what you make
> pancakes out of, or if you are in Scotland it's means to get beaten up -
> e.g. "I'll batter you, ya wee radge" :p)

Or at the chippie... I'd like some battered haggis and chips :)

Yummie, yummie, yummie.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] looking for a good gateway - php

2007-07-03 Thread Daniel Brown

On 7/3/07, Ross <[EMAIL PROTECTED]> wrote:

Hi All,


Worldpay is far too expensive.I am looking for a good gateway that.

-has a good php/linux sdk
-easy to integrate
-does not open new windows with the gateways logo all over the place but is
contained on my site
- has good rates
- does not take ages to get the cash from your account to your bank
account(paypal)


Any recommendations are most appreciated,


R.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   Are you not in the United States, Ross?  Because I've never waited
more than three days to get money transferred to my bank account from
PayPal, especially with the debit card.  I can get paid by someone on
the Website Payments Pro plan ($20 per month, with 2.9% + $0.30 max
per transaction) where they never know that anyone aside from myself
is involved (they never leave my site), and that same moment I can go
to an ATM and pull the cash out or spend it like a credit card
anywhere else.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Brain Teasers

2007-07-03 Thread Jay Blanchard
[snip]
> > So I'll double-whammy it with a "Name That Tune" factor:
> >
> >  >   class Thread {
> >  var $wheel;
> >  function Thread (){
> >$this->wheel = 'roun\'';
> >  }
> >   }
> >   while($wheel = new Thread());
> > ?>
"The wheel goes roun and roun" [sic]
[/snip]

if($x == 0.01 || $x == 1.0){
$y = "in";
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Jon Anderson

Andrei wrote:

I saw there is a free version of Studio, but I think it's for
students... You cannot go build a corporate project with it I think...
  


They're just "designed" for students and hobbyists (i.e. they stipped 
out the cool stuff), but you can use 'em for whatever.



From the faq: http://msdn.microsoft.com/vstudio/express/support/faq/

*4.**Can I use Express Editions for commercial use?*



Yes, there are no licensing restrictions for applications built using 
the Express Editions.




jon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Stut

Andrei wrote:

Stut wrote:

Andrei wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?

.


In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.

You have never needed to buy anything to develop ASP.net applications.

And if you feel the need for a nice IDE, Visual Studio Web Developer
Express Edition is available for free...

http://msdn.microsoft.com/vstudio/express/vwd/

Stop the FUD!

-Stut


I saw there is a free version of Studio, but I think it's for
students... You cannot go build a corporate project with it I think...


More FUD. Go read the licence before claiming to know what it says!

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-03 Thread Jim Lucas

kvigor wrote:

Ok Jim,

This is what I have so far and I'm still working it out.

$in_list = "".join('',$someArrayList);  // do I really need to concatenate 

it needs to be

$in_list = "'".join("','",$someArrayList)."'"; // you need the quotes!!

or separate anything here since my array values will be '7orange50lbs'? // 
this is the format I want.

You are going wrong right here.  First off you took out all the quoting

Your search items must be quoted and separated by commas.  Remember, we want it to check a 
list/array() of items


$in_list must look like this when done 'item1','item2','item3'

in SQL, this is a list.



$query_One = "SELECT * FROM shoe WHERE CONCAT(size,color,weight) 
IN({$in_list})";// size, color, weight are my column names


if you echo $query_One , what do you get?

$result = mysql_query($query_One ,$connection) or die("Query failed: ". 
mysql_error($connection));
before you run the fetch, you need to double check that you got something back, otherwise you will 
get an error from php.


if ( mysql_num_rows($results) > 0 ) {
while ( $row = mysql_fetch_array(
} else {
echo "No results";
}


$row = mysql_fetch_array($result);


and I would recommend that you use either *_assoc() or *_row() instead of 
*_array().
Doesn't use as much memory, and your resulting $row variable doesn't have two of what you are 
looking for.




This is the error I get back from the query:
Query failed: Unknown column '6blue40lbs' in 'where clause'


This is because you took out the quotes from above.  Put them back and it might 
just work.

SQL will see the un-quoted 6blue40lbs and think that it is a string.
If it was quoted, it would not.

// where am I

going wrong?


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] looking for a good gateway - php

2007-07-03 Thread Lester Caine

Ross wrote:

Worldpay is far too expensive.I am looking for a good gateway that.

-has a good php/linux sdk
-easy to integrate
-does not open new windows with the gateways logo all over the place but is 
contained on my site

- has good rates
- does not take ages to get the cash from your account to your bank 
account(paypal)



Any recommendations are most appreciated,


Actually I find that Paypal is not too bad when it comes to transferring money 
to my bank when I need to. But most of the time I can just keep it in other 
currencies and pay suppliers direct.


But it would be nice to find an alternative - now that Paypal have effectively 
introduced a monthly charge if you want to keep all the services. The fact 
that it WAS free knocked spots of the other services.


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Edward Vermillion


On Jul 3, 2007, at 8:52 AM, Stut wrote:


Andrei wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?

.


In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.


You have never needed to buy anything to develop ASP.net applications.



Ummm... Windows?



;)

Ed

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Jay Blanchard <[EMAIL PROTECTED]> wrote:

[snip]
> if($x == 0.01 || $x == 1.0){
> $y = "in";
> }
>
>
>

"One in a thousand" ?
[/snip]

Nope.



   Yes it is, you just don't know it yet.  ;-P

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jim Lucas

Jason Pruim wrote:

Hi Everyone!

Okay, so for those of you who remember I have been going back and forth 
on how to write a reoccuring task manager program for my office, it's a 
little bit a labor of love, little bit wanting to expand my knowledge.


Anyway, I've hit a problem... I am attempting to add away to reschedule 
tasks based on a value entered in a text box (IE: 7/3/07) and then 
create a timestamp off of that so that I can have it show up on that date.


The problem comes in when I try and submit the values to the update 
form, as of right now, it only picks up the info in the bottom text box 
and updates it None of the others, no matter how many/few I have 
selected to update.


I think I need to put the text boxes into an array (And possibly the 
check boxes as well) but I have never done that before for text boxes.. 
Is it as easy as textbox[] to create an array of text boxes? Or is there 
something else that I'm missing?


Here is some of the code:

$result = mysql_query($sql);
echo "";
echo "";
echo "
ID #
Tickler Name
Tickler Description
Completed
 Day to complete
Reschedule Date
";

while($row = mysql_fetch_array($result)) {


echo "ID#, $row[0] ";// ID #
echo "TicklerName, $row[1]  ";// 
Tickler Name
echo "Instructions, href='$row[2]'>Instructions";// Instructions
echo "DayOfWeekWord, $dowword ";// 
Day of week word
echo "DateToReschedule, name='txtReschedule' value=''>";//Date to reschedule
echo "DateRescheduled, $Date";//Date 
stored in timeStamp
//echo "href='update.php?taskid=$row[0]&taskdate=$taskdate'>Click here!";
echo "CheckboxForWhenDone, type='checkbox' name='chkDone' value='$row[0]'>";//Check box for when 
completed


}


First off, I would use the heredoc syntax for this chuck of code.

also if you are going to use the indexes of $row, then use mysql_fetch_row() 
instead of *_array()
Won't chew up as much resources.  I would recommend that you use *_assoc() instead, this way you can 
call to the column name and not have to rely on the DB layout never changing.


while($row = mysql_fetch_row($result)) {

echo <<
ID#, {$row[0]} 
TicklerName, {$row[1]}  
Instructions, Instructions
DayOfWeekWord, {$dowword} 
DateToReschedule,

DateRescheduled, {$Date}
Click 
here!
CheckboxForWhenDone,



HTML;

}




and the update form:



if ( isset($_POST['tasks']) && count($_POST['tasks']) > 0 ) {
foreach ( $_POST['tasks'] AS $id => $attributes ) {
if ( isset($attributes['chkDone']) && $attributes['chkDone'] == 
$id ) {
$id = mysql_real_escape_string((int)$id);
$SQL = "UPDATE tasks
SET completed='1',
timeStamp=NOW()  -- Assuming 
DATE/TIME/etc...
WHERE   id='{$id}'";
mysql_query($SQL) or die(mysql_error());
}
}
}


$taskdate1= $_POST['txtReschedule'];
$taskDone = $_POST['chkDone'];
$taskTime=mktime($taskdate1);

//$sql="UPDATE tasks SET completed='1', timeStamp='$taskdate1' where 
id='$taskid' LIMIT 1;";
$sql="update tasks set completed='1', timeStamp='$taskTime' where 
id='$taskDone' LIMIT 1;";






mysql_query($sql) or die(mysql_error());


Any help with this would be greatly appreciated! :)

Jason Pruim

--PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jochem Maas
Robert Cummings wrote:

...

>> I'll add the CSS once I can get the form to work properly, and can  
>> figure out how to change the color with css based on a certain value  
>> stored in a database IE: $rowColor :)
> 
> At it's simplest:
> 
> ''

...
if $rowColor is a hex based value using it as a CSS class is not really going 
to work
that well, in such cases I would opt to use inline css:

echo '';

> 
> 
>> To the point of the email though, is it just as simple as typing  
>> textbox[] and I have an array from the text boxes? :)
> 
> Yes, but only if one or more checkboxes get checked. Unchecked
> checkboxes are not sent to the server by the browser. So you need at

where did the checkboxes come from? I'm sure he was only asking about textboxes.

BUT: Rob is correct, and if you have a number of fields in each row (of which 
some
might be checkboxes) you are better off adding explicit array indices to the 
field
element names so that you can explicitly match values for a give row accross 
multiple
arrays:




for ($i = 1; isset($_POST['text'][$i]); $i++) {
$text = cleanInput($_POST['text'][$i]);
$chk  = isset($_POST['chk'][$i]);  // checkboxes are not sent if they 
are not checked
}

> leas one to have an array, but you can just check for existence of your
> incoming data before attempting to access array indexes.
> 
> Cheers,
> Rob.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Jay Blanchard <[EMAIL PROTECTED]> wrote:

[snip]
> > So I'll double-whammy it with a "Name That Tune" factor:
> >
> >  >   class Thread {
> >  var $wheel;
> >  function Thread (){
> >$this->wheel = 'roun\'';
> >  }
> >   }
> >   while($wheel = new Thread());
> > ?>
"The wheel goes roun and roun" [sic]
[/snip]

if($x == 0.01 || $x == 1.0){
$y = "in";
}





   "One in a thousand" ?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Andrei


Stut wrote:
> Andrei wrote:
>> I saw there is a free version of Studio, but I think it's for
>> students... You cannot go build a corporate project with it I think...
>
> More FUD. Go read the licence before claiming to know what it says!
>
> -Stut
>
I said *I think* didn't know for sure. And anyway I would read the bla
bla for something I don't need.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 17:57 +0200, Jochem Maas wrote:
> Robert Cummings wrote:
> 
> ...
> 
> >> I'll add the CSS once I can get the form to work properly, and can  
> >> figure out how to change the color with css based on a certain value  
> >> stored in a database IE: $rowColor :)
> > 
> > At it's simplest:
> > 
> > ''
> 
> ...
> if $rowColor is a hex based value using it as a CSS class is not really going 
> to work
> that well, in such cases I would opt to use inline css:
> 
> echo '';

Inline CSS is as maintainable as bgcolor. if you're using inline styling
then you've missed the point.

> >> To the point of the email though, is it just as simple as typing  
> >> textbox[] and I have an array from the text boxes? :)
> > 
> > Yes, but only if one or more checkboxes get checked. Unchecked
> > checkboxes are not sent to the server by the browser. So you need at
> 
> where did the checkboxes come from? I'm sure he was only asking about 
> textboxes.

I dunno :) Guess it was so similar to checkboxes and I most often use
array syntax in form fields when working with checkboxes that I got
confused :B

> BUT: Rob is correct, and if you have a number of fields in each row (of which 
> some
> might be checkboxes) you are better off adding explicit array indices to the 
> field
> element names so that you can explicitly match values for a give row accross 
> multiple
> arrays:
> 
>  value="1">
>  value="1">
> 
> for ($i = 1; isset($_POST['text'][$i]); $i++) {
>   $text = cleanInput($_POST['text'][$i]);
>   $chk  = isset($_POST['chk'][$i]);  // checkboxes are not sent if they 
> are not checked
> }
> 
> > leas one to have an array, but you can just check for existence of your
> > incoming data before attempting to access array indexes.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Brain Teasers

2007-07-03 Thread Jay Blanchard
[snip]
> if($x == 0.01 || $x == 1.0){
> $y = "in";
> }
>
>
>

"One in a thousand" ?
[/snip]

Nope.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Adam Schroeder
This is an important debate and I would hope to see a more lively 
discussion.  Many of us have to validate our choices and our employers 
don't care about anti-microsoft and anti-corporation arguments (I do 
believe the open-source versus closed-source argument is a valid one to 
make to your  employers).  I'm sure this question has come up many times 
on this board (and countless others), which might be why it is such a 
volatile topic.


Though, this has been an ongoing debate for many years... the debate is 
very fluid.  Arguments made in the past, like ASP.NET only works on IIS, 
might not be valid today.  Much of the literature out there does not 
reflect this.  I would like to offer this to the debate, benchmarks 
showing PHP to run faster:



http://www.wrensoft.com/zoom/benchmarks.html


I thought this was a very interesting find, as ASP.NET is a compiled 
language.  Theoretically, this would give ASP.NET an advantage as far as 
speed is concerned.  Does anyone else have other evidence where ASP.NET 
has been shown to run faster?  I don't think the benchmark I have given 
is very valid. 


Thanks,
Adam



Edward Vermillion wrote:



On Jul 3, 2007, at 8:52 AM, Stut wrote:


Andrei wrote:


Muhammad Hassan Samee wrote:


ASP.net VS PHP?

how PHP is batter?

.


In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.



You have never needed to buy anything to develop ASP.net applications.



Ummm... Windows?



;)

Ed



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Stut

Edward Vermillion wrote:


On Jul 3, 2007, at 8:52 AM, Stut wrote:


Andrei wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?

.


In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.


You have never needed to buy anything to develop ASP.net applications.



Ummm... Windows?

;)


Indeed. I apologise for that omission since that was true in the early 
days, but now even that is not required.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jochem Maas
Robert Cummings wrote:
> On Tue, 2007-07-03 at 17:57 +0200, Jochem Maas wrote:
>> Robert Cummings wrote:
>>
>> ...
>>
 I'll add the CSS once I can get the form to work properly, and can  
 figure out how to change the color with css based on a certain value  
 stored in a database IE: $rowColor :)
>>> At it's simplest:
>>>
>>> ''
>> ...
>> if $rowColor is a hex based value using it as a CSS class is not really 
>> going to work
>> that well, in such cases I would opt to use inline css:
>>
>> echo '';
> 
> Inline CSS is as maintainable as bgcolor. if you're using inline styling
> then you've missed the point.

$rowColor is coming from a DB (that was my assuption based on the OP's story) - 
it's value is,
for example, '#ff' so it cannot be used as a CSS class .. the OP may not be 
in
a position to change the data in the DB. There may be a style/color choosing
interface in his app that makes things very maintainable (especially for the 
developer
because the user does the work).

missing the point is not all bad - especially when the point is on the end of a 
sword :-)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Removing Spaces from Array Values

2007-07-03 Thread Al

foreach() is your friend for this type of operation.

foreach($someArray as $value){
$new_array[]= str_replace(' ','', $value);
}

OR

foreach($someArray as $value){
echo str_replace(' ','', $value) . "\n";
}



kvigor wrote:

Need to remove all spaces from Array Values... And this doesn't work.

This is similar info that's within array values: $someArray[0] = "PHP is 
awesome";s/b PHPisawesome
This is similar info that's within array values: $someArray[1] = "The Toy 
Boat";s/b TheToyBoat


Begin Code===
$num = count($someArray);

for($num = 0; $cntr < $num; $cntr++)
{
 str_replace(' ','',$someArray[$num]);
 echo "$someArray[$num]";
}
End Code=== 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jason Pruim


On Jul 3, 2007, at 12:46 PM, Jochem Maas wrote:


Robert Cummings wrote:

On Tue, 2007-07-03 at 17:57 +0200, Jochem Maas wrote:

Robert Cummings wrote:

...


I'll add the CSS once I can get the form to work properly, and can
figure out how to change the color with css based on a certain  
value

stored in a database IE: $rowColor :)

At it's simplest:

''

...
if $rowColor is a hex based value using it as a CSS class is not  
really going to work

that well, in such cases I would opt to use inline css:

echo '';


Inline CSS is as maintainable as bgcolor. if you're using inline  
styling

then you've missed the point.


$rowColor is coming from a DB (that was my assuption based on the  
OP's story) - it's value is,
for example, '#ff' so it cannot be used as a CSS class .. the  
OP may not be in
a position to change the data in the DB. There may be a style/color  
choosing
interface in his app that makes things very maintainable  
(especially for the developer

because the user does the work).

missing the point is not all bad - especially when the point is on  
the end of a sword :-)





Allow me to clear up one thing :)

$rowColor does not come from a database,

if($row[5] =='Level1' or $row[5] =='level1'or $row[5] =='level 1'or  
$row[5] =='Level 1'){

// Yellow Highlight
$rowColor = $Level1;

Currently $Level1 is hardcoded into the php file and provides color  
information based on $row[5] which does come from the database :)


And I do have full control over the info in the database. It's a  
internal project to make us more of a paperless office.



Oh, And I do have a check box on the form, just 1 per row, use it to  
be able to check it when the project is done.


And for anyone that is interested: HTTP://www.raoset.com/tests/ 
ticklers/viewall.php <-- That's the output of the form :) Please  
don't abuse it! :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread tedd

At 3:53 PM +0500 7/3/07, Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?


You take a little flour, milk, egg and mix. Liberally coat the php 
and then fry. It taste much better than asp and you don't have to 
risk your life chasing it down.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Removing Spaces from Array Values

2007-07-03 Thread Jim Lucas

kvigor wrote:

Need to remove all spaces from Array Values... And this doesn't work.

Are we talking spaces ' ' or all white space?  This may include a tab, space, 
new line, etc...



This is similar info that's within array values: $someArray[0] = "PHP is 
awesome";s/b PHPisawesome
This is similar info that's within array values: $someArray[1] = "The Toy 
Boat";s/b TheToyBoat


Begin Code===
$num = count($someArray);

for($num = 0; $cntr < $num; $cntr++)
{
 str_replace(' ','',$someArray[$num]);
 echo "$someArray[$num]";
}
End Code=== 



This should do for you

 $v ) {

$someArray[$k] = preg_replace('!\s!', '', $v);  // Removes white space 
' ', \n, \r\n, etc...

$someArray[$k] = str_replace(' ', '', $v);  // Removes only spaces

}

print_r($someArray);


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Swear filter ideas

2007-07-03 Thread tedd

At 1:32 AM -0500 7/3/07, Richard Lynch wrote:

On Wed, June 27, 2007 5:18 pm, Richard Davey wrote:

 How do you go about implementing a swear / bad-word filter in PHP?

 Reasons for needing one aside, I'm just wondering if you favour a
 regexp, a substr_count, or what? Do you like to *** out the bad words,
 or just error back to the user? (I guess that is application
 specific).

 There are always ways to circumvent them, but I'm still curious to
 know how you prefer to handle it.


Don't.

Trying to solve a social problem with software hacks never works out
well.



To further drive the point home, it might be interesting to write a 
routine that would take the inferred "bad" words and replace them 
with real bad words. Then when someone enters a perfectly 
non-swearing sentence, it's transformed into something really filthy.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Edward Vermillion


On Jul 3, 2007, at 12:35 PM, Jim Lucas wrote:


Edward Vermillion wrote:

On Jul 3, 2007, at 8:52 AM, Stut wrote:

Andrei wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?

.

In short words it's not Micro$oft and you don't need to buy  
stuff to

develop in it.


You have never needed to buy anything to develop ASP.net  
applications.



Ummm... Windows?


For which part?

The server?  I may be wrong, but can't this be done under Apache now?
Isn't there a module for this?

Writing ASP?  Basic vi, joe, emacs, mg, etc...  they work just fine.



Yeah, I was referring to the server.

I wasn't aware that ASP could live outside of the MS bubble. Although  
I have heard of the mono(?) project to get an open source equivalent  
of .net, I just hadn't heard of anyone writing an ASP processor for  
apache. Ewww


Ed

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread tedd

At 7:36 AM -0600 7/3/07, John Meyer wrote:

Muhammad Hassan Samee wrote:

 ASP.net VS PHP?

 how PHP is batter?



Without context that question is meaningless and only serves as troll bait.


H, batter as bait -- that's an idea.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Tijnema

On 7/3/07, Stut <[EMAIL PROTECTED]> wrote:

Edward Vermillion wrote:
>
> On Jul 3, 2007, at 8:52 AM, Stut wrote:
>
>> Andrei wrote:
>>> Muhammad Hassan Samee wrote:
 ASP.net VS PHP?

 how PHP is batter?

 .

>>> In short words it's not Micro$oft and you don't need to buy stuff to
>>> develop in it.
>>
>> You have never needed to buy anything to develop ASP.net applications.
>>
>
> Ummm... Windows?
>
> ;)

Indeed. I apologise for that omission since that was true in the early
days, but now even that is not required.

-Stut



Nope, With the use of Mono & mod_mono you can run ASP.NET application
in Apache on a Unix box :)

Tijnema

--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Tijnema

On 7/3/07, Edward Vermillion <[EMAIL PROTECTED]> wrote:


On Jul 3, 2007, at 12:35 PM, Jim Lucas wrote:

> Edward Vermillion wrote:
>> On Jul 3, 2007, at 8:52 AM, Stut wrote:
>>> Andrei wrote:
 Muhammad Hassan Samee wrote:
> ASP.net VS PHP?
>
> how PHP is batter?
>
> .
>
 In short words it's not Micro$oft and you don't need to buy
 stuff to
 develop in it.
>>>
>>> You have never needed to buy anything to develop ASP.net
>>> applications.
>>>
>> Ummm... Windows?
>
> For which part?
>
> The server?  I may be wrong, but can't this be done under Apache now?
>   Isn't there a module for this?
>
> Writing ASP?  Basic vi, joe, emacs, mg, etc...  they work just fine.
>

Yeah, I was referring to the server.

I wasn't aware that ASP could live outside of the MS bubble. Although
I have heard of the mono(?) project to get an open source equivalent
of .net, I just hadn't heard of anyone writing an ASP processor for
apache. Ewww

Ed



I have the Mono project and the mod_mono compiled, and loaded in
Apache. I didn't test it fully yet, but the simple write command works
:)

Tijnema

--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Brain Teasers

2007-07-03 Thread tedd

Ok, I'll play.

Phrase:

one = rand(1,100);

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how PHP is batter?

2007-07-03 Thread Jim Lucas

Edward Vermillion wrote:


On Jul 3, 2007, at 8:52 AM, Stut wrote:


Andrei wrote:

Muhammad Hassan Samee wrote:

ASP.net VS PHP?

how PHP is batter?

.


In short words it's not Micro$oft and you don't need to buy stuff to
develop in it.


You have never needed to buy anything to develop ASP.net applications.



Ummm... Windows?


For which part?

The server?  I may be wrong, but can't this be done under Apache now?
Isn't there a module for this?

Writing ASP?  Basic vi, joe, emacs, mg, etc...  they work just fine.





;)

Ed




--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 13:18 -0400, Jason Pruim wrote:
>
> And for anyone that is interested: HTTP://www.raoset.com/tests/ 
> ticklers/viewall.php <-- That's the output of the form :) Please  
> don't abuse it! :)

My eyes are bleeding... gh. 

:)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Brain Teasers

2007-07-03 Thread Jay Blanchard
[snip]
Ok, I'll play.

Phrase:

one = rand(1,100);
[/snip]

One in a million. Still waiting to see if who gets the last one I
posted.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread Jason Pruim

I'm matching a color coding scheme that was already established :P

But the red on yellow is a little bright ;)


On Jul 3, 2007, at 2:08 PM, Robert Cummings wrote:


On Tue, 2007-07-03 at 13:18 -0400, Jason Pruim wrote:


And for anyone that is interested: HTTP://www.raoset.com/tests/
ticklers/viewall.php <-- That's the output of the form :) Please
don't abuse it! :)


My eyes are bleeding... gh.

:)

Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] getting timestamp for first day of current week

2007-07-03 Thread Olav Mørkrid

hello

how do i get the TIMESTAMP for the FIRST DAY of the CURRENT WEEK (ie.
monday 00:00:00)?

i tried using strtotime("monday"), but:

- when i use it on a monday, i get monday THIS WEEK
- when i use it on tuesday thru sunday, i get monday NEXT WEEK

i tried "last monday", "monday this week", "this monday", etc. but
nothing helps.

this code proves the issue (2 july is a monday, 8 july is a sunday)

 for($d=2; $d<=8; $d++) {
   $time = strtotime("$d july 2007");
   $date = date("Y-m-d", strtotime("monday", $time));
   echo "$date\n";
 }

is this a bug, or a locale issue? at any rate, how do i get monday 00:00:00?

thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] getting timestamp for first day of current week

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 20:19 +0200, Olav Mørkrid wrote:
> hello
> 
> how do i get the TIMESTAMP for the FIRST DAY of the CURRENT WEEK (ie.
> monday 00:00:00)?
> 
> i tried using strtotime("monday"), but:
> 
> - when i use it on a monday, i get monday THIS WEEK
> - when i use it on tuesday thru sunday, i get monday NEXT WEEK

If that's ALWAYS the case then it sounds like you have all the
information you need to get the Monday you want :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] task Scheduler driving me crazy!

2007-07-03 Thread tedd

At 5:05 PM +0300 7/3/07, Andrei wrote:

Anyway you should get rid of echoing everything from php... It really
gets you mad when you want to change things...

while($row = mysql_fetch_array($result))
{
?>
   
ID#, 
TicklerName, 
etc...
   
   

Andrei:

Well don't -- use css instead:

First, define a background-color in a css class, like so:

.myRow0
  {
  background-color: yellow;
  }

.myRow1
  {
  background-color: red;
  }

Then in your php, assign:

$rowColor = 'myRow0';  // actually this is column color and not row color

?>
   
ID#, 
TicklerName, 
etc...
   
   ">
  

See it work here:

http://www.webbytedd.com/b/color-rows/

It works better than anything I've read thus far.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: how PHP is batter?

2007-07-03 Thread Colin Guthrie
Stut wrote:
> Andrei wrote:
>> Muhammad Hassan Samee wrote:
>>> ASP.net VS PHP?
>>>
>>> how PHP is batter?
>>>
>>> .
>>>
>> In short words it's not Micro$oft and you don't need to buy stuff to
>> develop in it.
> 
> You have never needed to buy anything to develop ASP.net applications.
> 
> And if you feel the need for a nice IDE, Visual Studio Web Developer
> Express Edition is available for free...
> 
> http://msdn.microsoft.com/vstudio/express/vwd/
> 
> Stop the FUD!

Whist I can't disagree that Visual Studio Express is in itself free (as
in beer) it doesn't come without the risk of MS lawyers threatening
legal action against you.

http://www.theregister.co.uk/2007/06/05/microsoft_mvp_threats/

So you have to consider the indirect costs (like buying Windows to run
the IDE in the first place - unless it runs (legally) under Wine)

Now that's what I call proper FUD :D

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Brain Teasers

2007-07-03 Thread Colin Guthrie
Robert Cummings wrote:
> On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
>> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
>>> On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
 I think I have to answer to this one: 'If at first you don't succeed
 try,
 try again'.
>>> Here's another one...
>>>
>>> >>
>>> $x = rand( 1, 20 );
>>> for( $i = 0; $i < $x; $i++ );
>>> while( --$i > 0 );
>>>
>>> ?>
>> Didn't see an answer to this one...
> 
> It was pretty simple... "What goes up must come down." :)

Damn, I was so close!!

Ahh well, how about this:

wood(); // Blerg

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Colin Guthrie <[EMAIL PROTECTED]> wrote:

Robert Cummings wrote:
> On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
>> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
>>> On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
 I think I have to answer to this one: 'If at first you don't succeed
 try,
 try again'.
>>> Here's another one...
>>>
>>> >>
>>> $x = rand( 1, 20 );
>>> for( $i = 0; $i < $x; $i++ );
>>> while( --$i > 0 );
>>>
>>> ?>
>> Didn't see an answer to this one...
>
> It was pretty simple... "What goes up must come down." :)

Damn, I was so close!!

Ahh well, how about this:

wood(); // Blerg

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




   "If a tree falls in the woods, and no one is there to hear it,
does it make a sound?"

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Brain Teasers

2007-07-03 Thread Colin Guthrie
Daniel Brown wrote:
>> Ahh well, how about this:
>>
>> >
>> abstract class wood
>> {
>>   protected function the()
>>   {
>>
>>   }
>> }
>>
>> class thetrees extends wood
>> {
>>   public function foo()
>>   {
>>   }
>> }
>>
>>
>> $u = new thetrees();
>> $u->wood(); // Blerg
>>
>"If a tree falls in the woods, and no one is there to hear it,
> does it make a sound?"
> 


Nope - It's more about not seeing what is in front of you. The parse
error is deliberate

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 19:54 +0100, Colin Guthrie wrote:
> Robert Cummings wrote:
> > On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:
> >> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:
> >>> On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:
>  I think I have to answer to this one: 'If at first you don't succeed
>  try,
>  try again'.
> >>> Here's another one...
> >>>
> >>>  >>>
> >>> $x = rand( 1, 20 );
> >>> for( $i = 0; $i < $x; $i++ );
> >>> while( --$i > 0 );
> >>>
> >>> ?>
> >> Didn't see an answer to this one...
> > 
> > It was pretty simple... "What goes up must come down." :)
> 
> Damn, I was so close!!
> 
> Ahh well, how about this:
> 
>  
> abstract class wood
> {
>   protected function the()
>   {
> 
>   }
> }
> 
> class thetrees extends wood
> {
>   public function foo()
>   {
>   }
> }
> 
> 
> $u = new thetrees();
> $u->wood(); // Blerg

Is it related to humping trees and getting "wood"?

Unfortunately I don't have a better comment since I don't see any
woodchuck references :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Brain Teasers

2007-07-03 Thread Jay Blanchard
[snip]
if($x == 0.01 || $x == 1.0){
   $y = "in";
}
[/snip]

Anyone?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Brain Teasers

2007-07-03 Thread Colin Guthrie
Jay Blanchard wrote:
> [snip]
> if($x == 0.01 || $x == 1.0){
>$y = "in";
> }
> [/snip]
> 
> Anyone?


I'm struggling.

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 20:00 +0100, Colin Guthrie wrote:
> Daniel Brown wrote:
> >> Ahh well, how about this:
> >>
> >>  >>
> >> abstract class wood
> >> {
> >>   protected function the()
> >>   {
> >>
> >>   }
> >> }
> >>
> >> class thetrees extends wood
> >> {
> >>   public function foo()
> >>   {
> >>   }
> >> }
> >>
> >>
> >> $u = new thetrees();
> >> $u->wood(); // Blerg
> >>
> >"If a tree falls in the woods, and no one is there to hear it,
> > does it make a sound?"
> > 
> 
> 
> Nope - It's more about not seeing what is in front of you. The parse
> error is deliberate

Your hint was too good :)

"Can't see the woods for the trees."

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote:
> Jay Blanchard wrote:
> > [snip]
> > if($x == 0.01 || $x == 1.0){
> >$y = "in";
> > }
> > [/snip]
> > 
> > Anyone?
> 
> 
> I'm struggling.

I'm not getting any lightbulbs either :/

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Daniel Brown <[EMAIL PROTECTED]> wrote:

On 7/3/07, Colin Guthrie <[EMAIL PROTECTED]> wrote:
> Jay Blanchard wrote:
> > [snip]
> > if($x == 0.01 || $x == 1.0){
> >$y = "in";
> > }
> > [/snip]
> >
> > Anyone?
>
>
> I'm struggling.
>
> Col
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107



   The best I could come up with was "one in a hundred."

   I think I'm stumpifimicated, too.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Brain Teasers

2007-07-03 Thread Paul Novitski

At 7/3/2007 12:11 PM, Jay Blanchard wrote:

[snip]
if($x == 0.01 || $x == 1.0){
   $y = "in";
}
[/snip]



In for a penny, in for a pound.  Metric, that is!

Regards,

Paul
__

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote:
> On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote:
> > Jay Blanchard wrote:
> > > [snip]
> > > if($x == 0.01 || $x == 1.0){
> > >$y = "in";
> > > }
> > > [/snip]
> > > 
> > > Anyone?
> > 
> > 
> > I'm struggling.
> 
> I'm not getting any lightbulbs either :/

Best I can think currently is "In dollars and cents".

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Tijnema

On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote:
> On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote:
> > Jay Blanchard wrote:
> > > [snip]
> > > if($x == 0.01 || $x == 1.0){
> > >$y = "in";
> > > }
> > > [/snip]
> > >
> > > Anyone?
> >
> >
> > I'm struggling.
>
> I'm not getting any lightbulbs either :/

Best I can think currently is "In dollars and cents".

Cheers,
Rob.


I would write that as "In cents or dollars".

Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Daniel Brown

On 7/3/07, Colin Guthrie <[EMAIL PROTECTED]> wrote:

Jay Blanchard wrote:
> [snip]
> if($x == 0.01 || $x == 1.0){
>$y = "in";
> }
> [/snip]
>
> Anyone?


I'm struggling.

Col

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Brain Teasers

2007-07-03 Thread Jay Blanchard
[snip]
At 7/3/2007 12:11 PM, Jay Blanchard wrote:
>[snip]
>if($x == 0.01 || $x == 1.0){
>$y = "in";
>}
>[/snip]


In for a penny, in for a pound.  Metric, that is!
[/snip]

Correct! 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Jim Lucas

Colin Guthrie wrote:

Robert Cummings wrote:

On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote:

On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote:

On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote:

I think I have to answer to this one: 'If at first you don't succeed
try,
try again'.

Here's another one...

 0 );

?>

Didn't see an answer to this one...

It was pretty simple... "What goes up must come down." :)


Damn, I was so close!!

Ahh well, how about this:

wood(); // Blerg



Maybe..

Protect our public forests

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 21:41 +0200, Tijnema wrote:
> On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote:
> > > On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote:
> > > > Jay Blanchard wrote:
> > > > > [snip]
> > > > > if($x == 0.01 || $x == 1.0){
> > > > >$y = "in";
> > > > > }
> > > > > [/snip]
> > > > >
> > > > > Anyone?
> > > >
> > > >
> > > > I'm struggling.
> > >
> > > I'm not getting any lightbulbs either :/
> >
> > Best I can think currently is "In dollars and cents".
> >
> > Cheers,
> > Rob.
> 
> I would write that as "In cents or dollars".

The union formed by the or operator creates a set that includes both. As
such when describing the set one would use "and".

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Tijnema

On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Tue, 2007-07-03 at 21:41 +0200, Tijnema wrote:
> On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote:
> > > On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote:
> > > > Jay Blanchard wrote:
> > > > > [snip]
> > > > > if($x == 0.01 || $x == 1.0){
> > > > >$y = "in";
> > > > > }
> > > > > [/snip]
> > > > >
> > > > > Anyone?
> > > >
> > > >
> > > > I'm struggling.
> > >
> > > I'm not getting any lightbulbs either :/
> >
> > Best I can think currently is "In dollars and cents".
> >
> > Cheers,
> > Rob.
>
> I would write that as "In cents or dollars".

The union formed by the or operator creates a set that includes both. As
such when describing the set one would use "and".

Cheers,
Rob.
--


Aah, nvm, it was wrong anyway ;)

Tijnema

--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 21:54 +0200, Tijnema wrote:
> On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > On Tue, 2007-07-03 at 21:41 +0200, Tijnema wrote:
> > > On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
> > > > On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote:
> > > > > On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote:
> > > > > > Jay Blanchard wrote:
> > > > > > > [snip]
> > > > > > > if($x == 0.01 || $x == 1.0){
> > > > > > >$y = "in";
> > > > > > > }
> > > > > > > [/snip]
> > > > > > >
> > > > > > > Anyone?
> > > > > >
> > > > > >
> > > > > > I'm struggling.
> > > > >
> > > > > I'm not getting any lightbulbs either :/
> > > >
> > > > Best I can think currently is "In dollars and cents".
> > > >
> > > > Cheers,
> > > > Rob.
> > >
> > > I would write that as "In cents or dollars".
> >
> > The union formed by the or operator creates a set that includes both. As
> > such when describing the set one would use "and".
> >
> > Cheers,
> > Rob.
> > --
> 
> Aah, nvm, it was wrong anyway ;)

Yeah, I knew Paul had it when I saw his repsonse *hehe*. I was thinking
in dollars and cents instead of sterling :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   >