Re: [PHP] echo?

2011-03-22 Thread Daniel Brown
On Tue, Mar 22, 2011 at 18:22, Jim Giner jim.gi...@albanyhandball.com wrote: [snip!] for ($i=0;$i$rows;$i++)    echo $i.' '.$row['itemname']; I expected to see : 1 item1 2 item2 ... ... but instead I got 1 item1 f item2 Yes - an 'f' and not a 2. Tried it some more with this:

Re: [PHP] echo?

2011-03-22 Thread Robert Cummings
On 11-03-22 06:22 PM, Jim Giner wrote: Kinda new to this, but I've been puttering/writing for about 3 weeks now and have some good working screens up. Ran into something new while I was debuggina script today. Tried to echo the $i value within a for loop as part of the list of items I was

Re: [PHP] echo?

2011-03-22 Thread David Harkness
Are you sure? $ php -a php for ($i = 0; $i 10; $i++) { echo $i . ' '; } 0 1 2 3 4 5 6 7 8 9 David

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread ceo
Fire up Live HTTP Headers in Firefox. My theory is that the browser is RE-requesting the data because of the private, must-revalidate. So it goes like this: Browser - GET - Ecomm: fooie ; unset Ecomm Browser - GET - Ecomm: [not set] If you are using Ajax and JS and whatnot, the

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 19:11 +, [EMAIL PROTECTED] wrote: Fire up Live HTTP Headers in Firefox. My theory is that the browser is RE-requesting the data because of the private, must-revalidate. So it goes like this: Browser - GET - Ecomm: fooie ; unset Ecomm Browser -

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Tim | iHostNZ
On Wed, Dec 10, 2008 at 8:11 AM, [EMAIL PROTECTED] wrote: Fire up Live HTTP Headers in Firefox. Where is this Live HTTP Headers in Firefox? Is it an extension? My theory is that the browser is RE-requesting the data because of the private, must-revalidate. So it goes like this: Browser

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Eric Wood
I have two vars doing the same thing. One is echo'd/unset in the head/head section and the other echo'd/unset in the footer of the page. No re-direct request is being made. Ok now check this. If I use this code: if(isset($_SESSION[Ecomm])) { echo $_SESSION[Ecomm];

Re: [PHP] echo SESSION var doesn't work if unset after echo

2008-12-09 Thread Ashley Sheridan
On Tue, 2008-12-09 at 16:51 -0500, Eric Wood wrote: I have two vars doing the same thing. One is echo'd/unset in the head/head section and the other echo'd/unset in the footer of the page. No re-direct request is being made. Ok now check this. If I use this code:

Re: [PHP] Echo in __GET()

2008-08-05 Thread Micah Gersten
You can write 2 functions to handle this. Value and OutputValue Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Tyler C. wrote: Is the a way to have an array, or use __get() to provide different data if you are echoing a variable, rather than if you are

Re: [PHP] echo returnArray()['a']; // workaround

2008-05-24 Thread Nitsan Bin-Nun
Nice trick, I will remember this one. Thanks for sharing, Nitsan On 23/05/2008, Nathan Nobbe [EMAIL PROTECTED] wrote: On Fri, Feb 29, 2008 at 12:16 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: wow, im going to have to stare at some of those and play around with them as soon as im half awake

Re: [PHP] echo returnArray()['a']; // workaround

2008-05-22 Thread Nathan Nobbe
On Fri, Feb 29, 2008 at 12:16 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: wow, im going to have to stare at some of those and play around with them as soon as im half awake :) of course i still like my solution ;) but im excited about the experimentation and ideas that have been shared on

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-29 Thread Shawn McKenzie
Nathan Rixham wrote: Nathan Nobbe wrote: On Thu, Feb 28, 2008 at 6:14 PM, Nathan Rixham [EMAIL PROTECTED] wrote: if I show you guys how to do this: echo sillyFunc()['a'] . PHP_EOL; using a few brackets and things do you promise not to laugh? *it's a bit weird* id like to see it.

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Ray Hauge
Nathan Nobbe wrote: all, as we have discussed previously, php does not have support for retrieving array values on the same line in which they are returned. i have created a simple workaround, and would like to share. first there is the class (w/ other features omitted for the post) ?php

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Nobbe
On Thu, Feb 28, 2008 at 2:36 PM, Ray Hauge [EMAIL PROTECTED] wrote: That's pretty cool. I wasn't sure if it would work with numerically indexed arrays, so I tried: // sillyFunc returns array(0=1, 1=2); ArrayClass::create(sillyFunc())-{0} I just tested it, and that works. If you leave

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Eric Butera
On Thu, Feb 28, 2008 at 2:16 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: all, as we have discussed previously, php does not have support for retrieving array values on the same line in which they are returned. i have created a simple workaround, and would like to share. first there is the

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Jim Lucas
Nathan Nobbe wrote: all, as we have discussed previously, php does not have support for retrieving array values on the same line in which they are returned. i have created a simple workaround, and would like to share. first there is the class (w/ other features omitted for the post) ?php

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Rixham
Nathan Nobbe wrote: On Thu, Feb 28, 2008 at 2:36 PM, Ray Hauge [EMAIL PROTECTED] wrote: That's pretty cool. I wasn't sure if it would work with numerically indexed arrays, so I tried: // sillyFunc returns array(0=1, 1=2); ArrayClass::create(sillyFunc())-{0} I just tested it, and that

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Nobbe
On Thu, Feb 28, 2008 at 4:22 PM, Jim Lucas [EMAIL PROTECTED] wrote: So, I guess my question would be, why not take it one level deeper. ?php include('ArrayClass.php'); function sillyFunc() { return ArrayClass::create(array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4)); } echo sillyFunc()-a

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Nobbe
On Thu, Feb 28, 2008 at 6:14 PM, Nathan Rixham [EMAIL PROTECTED] wrote: if I show you guys how to do this: echo sillyFunc()['a'] . PHP_EOL; using a few brackets and things do you promise not to laugh? *it's a bit weird* id like to see it. -nathan

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Rixham
Nathan Nobbe wrote: On Thu, Feb 28, 2008 at 6:14 PM, Nathan Rixham [EMAIL PROTECTED] wrote: if I show you guys how to do this: echo sillyFunc()['a'] . PHP_EOL; using a few brackets and things do you promise not to laugh? *it's a bit weird* id like to see it. -nathan don't say I didn't

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Robert Cummings
On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote: don't say I didn't warn ya fellow nathan! #!/usr/bin/php ?php function sillyFunc() { return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some string'); } echo !${~${''}='sillyFunc'}=${''}().${~${''}}['e'] . PHP_EOL; I

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Rixham
Robert Cummings wrote: On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote: don't say I didn't warn ya fellow nathan! #!/usr/bin/php ?php function sillyFunc() { return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some string'); } echo

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Rixham
Robert Cummings wrote: On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote: don't say I didn't warn ya fellow nathan! #!/usr/bin/php ?php function sillyFunc() { return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some string'); } echo

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Robert Cummings
On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote: Robert Cummings wrote: On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote: don't say I didn't warn ya fellow nathan! #!/usr/bin/php ?php function sillyFunc() { return array('a' = 1, 'b' = 2, 'c' = 3, 'd' = 4, 'e'='some

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Robert Cummings
On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote: On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote: Robert Cummings wrote: On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote: don't say I didn't warn ya fellow nathan! #!/usr/bin/php ?php function sillyFunc()

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Rixham
Robert Cummings wrote: On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote: On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote: Robert Cummings wrote: On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote: don't say I didn't warn ya fellow nathan! #!/usr/bin/php ?php function

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Robert Cummings
On Fri, 2008-02-29 at 04:38 +, Nathan Rixham wrote: Robert Cummings wrote: On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote: On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote: Robert Cummings wrote: On Fri, 2008-02-29 at 00:18 +, Nathan Rixham wrote: don't say I

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Casey
On Thu, Feb 28, 2008 at 8:38 PM, Nathan Rixham [EMAIL PROTECTED] wrote: Robert Cummings wrote: On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote: On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote: Robert Cummings wrote: On Fri, 2008-02-29 at 00:18 +, Nathan Rixham

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Robert Cummings
On Thu, 2008-02-28 at 20:42 -0800, Casey wrote: On Thu, Feb 28, 2008 at 8:38 PM, Nathan Rixham [EMAIL PROTECTED] wrote: Robert Cummings wrote: On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote: On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote: Robert Cummings wrote:

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Casey
On Thu, Feb 28, 2008 at 8:42 PM, Casey [EMAIL PROTECTED] wrote: On Thu, Feb 28, 2008 at 8:38 PM, Nathan Rixham [EMAIL PROTECTED] wrote: Robert Cummings wrote: On Thu, 2008-02-28 at 23:27 -0500, Robert Cummings wrote: On Fri, 2008-02-29 at 04:04 +, Nathan Rixham wrote:

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Rixham
Casey wrote: I don't know why I'm continuing this... but for the truly crazy: function w($t) { $t = array('f' = '...'); return 't'; } echo ${w($t)}['f']; addictive isn't it! casey, I truelly believe that's as short as it can

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Robert Cummings
On Fri, 2008-02-29 at 05:34 +, Nathan Rixham wrote: Casey wrote: I don't know why I'm continuing this... but for the truly crazy: function w($t) { $t = array('f' = '...'); return 't'; } echo ${w($t)}['f']; addictive isn't it!

Re: [PHP] echo returnArray()['a']; // workaround

2008-02-28 Thread Nathan Nobbe
wow, im going to have to stare at some of those and play around with them as soon as im half awake :) of course i still like my solution ;) but im excited about the experimentation and ideas that have been shared on this topic, very interesting really! -nathan

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); That's not cool, that's a mess. Why doe sit happen the way it does? First off, print() is a function so nesting

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Andrew Ballard
On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); That's not cool, that's a mess. Why doe sit happen the

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread tedd
At 11:46 AM -0400 10/23/07, Robert Cummings wrote: On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); That's not cool, that's a mess. Why doe sit happen the way it

RE: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Instruct ICC
Hello everyone. We all know the difference between print and echo, but has someone ever tried to combine them together ?? Right, try this : ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu ')); And guess the

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 11:54 -0400, Andrew Ballard wrote: On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote: ?php echo coucou . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) . 'tata ' . print('zozo ' . print('pupu

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Andrew Ballard
On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: My bad, print is not a function, and so: print( 'toctoc ' ).'hihi '; is equivalent to: print( 'tocktoc '.'hihi ' ); Ah. I see. I knew they were optional, but I didn't know that when you include them PHP evaluates ('toctoc')

Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Julien Pauli
That's just the case : too see what happens if I agree that anyone will never meet such a case in everydays' programming. ;-) 2007/10/23, Andrew Ballard [EMAIL PROTECTED]: On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote: My bad, print is not a function, and so: print(

Re: [PHP] echo date('Y-m-d', $mydata-timestamp);

2007-04-24 Thread Richard Lynch
Use the MySQL function that converts timestamp into Unixtime. Or, better yet, use the MySQL function that outputs exactly the date format you want, without dinking around with Unix timestamp in the middle. http://dev.mysql.com/ Search for date_format() I do believe. It's gonna be a whole lot

Re: [PHP] echo date('Y-m-d', $mydata-timestamp);

2007-04-22 Thread Richard Lynch
On Sun, April 22, 2007 1:05 am, John Taylor-Johnston wrote: $mydata-timestamp = 20070419162123; echo date('Y-m-d', $mydata-timestamp); result: 2038-01-18 ?? What is wrong?? Should be 2007-04-19? date() takes a Unix timestamp as its input. Unix timestamps are measured as number of seconds

Re: [PHP] echo date('Y-m-d', $mydata-timestamp);

2007-04-22 Thread John Taylor-Johnston
It is actually a generated timestamp in MySQL. timestamp(14) Now what? I was hoping to avoid: |echo substr(|$mydata-timestamp|, 0, 8); John |Richard Lynch wrote: On Sun, April 22, 2007 1:05 am, John Taylor-Johnston wrote: $mydata-timestamp = 20070419162123; echo date('Y-m-d',

Re: [PHP] echo date('Y-m-d', $mydata-timestamp);

2007-04-22 Thread Børge Holen
On Sunday 22 April 2007 08:33, John Taylor-Johnston wrote: It is actually a generated timestamp in MySQL. timestamp(14) Well, then just use the query to decide how it should look like. Mysql timestamp is amazingly easy to work with. whatevertable,date_format(timestamp_table, 'what should it

Re: [PHP] echo date('Y-m-d', $mydata-timestamp);

2007-04-22 Thread Jochem Maas
John Taylor-Johnston wrote: It is actually a generated timestamp in MySQL. timestamp(14) Now what? I was hoping to avoid: |echo substr(|$mydata-timestamp|, 0, 8); the simplest answer is actually yto make mySQL give you the data in unix timestamp format in the first place: SELECT

RE: [PHP] echo date('Y-m-d', $mydata-timestamp);

2007-04-22 Thread Buesching, Logan J
You are misunderstanding what timestamp means. The value of a timestamp is from UNIX epoch http://en.wikipedia.org/wiki/Unix_time. It is calculated by the number of seconds after January 1st, 1970. Also note, that you are overflowing the integer, which is giving you a

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/18/07, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: Whenever I see people put their code up for review, I realize they mostly use print instead of echo, while I am using echo 99% of the time. Actually, I can't even remember when I last

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: On 4/18/07, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: Whenever I see people put their code up for review, I realize they mostly use print instead of echo, while I am using echo 99% of the time. Actually, I can't even

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/21/07, Stut [EMAIL PROTECTED] wrote: Tijnema ! wrote: On 4/18/07, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: Whenever I see people put their code up for review, I realize they mostly use print instead of echo, while I am using

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: On 4/21/07, Stut [EMAIL PROTECTED] wrote: Tijnema ! wrote: There is a difference, echo is slightly faster. code used for benchmark: ? $start = microtime(TRUE); for ($i=0; $i10; ++$i) { print ABC; } echo sprintf(With print ($i): %0.3f\n,microtime(TRUE) - $start);

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/21/07, Stut [EMAIL PROTECTED] wrote: Tijnema ! wrote: On 4/21/07, Stut [EMAIL PROTECTED] wrote: Tijnema ! wrote: There is a difference, echo is slightly faster. code used for benchmark: ? $start = microtime(TRUE); for ($i=0; $i10; ++$i) { print ABC; } echo sprintf(With

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: But what else would you use a lot in your code? all commonly used things (like while, if, echo, etc) are just (nearly) as fast as their alternatives (for, print, etc). Other functions (like file/stream) might be some performance difference, but you probably use this only a few

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/22/07, Stut [EMAIL PROTECTED] wrote: Tijnema ! wrote: But what else would you use a lot in your code? all commonly used things (like while, if, echo, etc) are just (nearly) as fast as their alternatives (for, print, etc). Other functions (like file/stream) might be some performance

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: On 4/22/07, Stut [EMAIL PROTECTED] wrote: Tijnema ! wrote: But what else would you use a lot in your code? all commonly used things (like while, if, echo, etc) are just (nearly) as fast as their alternatives (for, print, etc). Other functions (like file/stream) might be

Re: [PHP] echo or print ?

2007-04-21 Thread Richard Lynch
On Sat, April 21, 2007 5:20 pm, Tijnema ! wrote: But what else would you use a lot in your code? all commonly used things (like while, if, echo, etc) are just (nearly) as fast as their alternatives (for, print, etc). Other functions (like file/stream) might be some performance difference, but

Re: [PHP] echo or print ?

2007-04-17 Thread clive
What do you guys use, and what is the advantage (if ther is any) of print over echo? And I am not talking about print_r or anything, just the regular print. :o) print returns a result, echo doesn't. This makes echo slightly faster than print, but I doubt theres any significant speed

Re: [PHP] echo or print ?

2007-04-17 Thread heavyccasey
Me too. I use echo. Print is a function. There's no significant difference between them. My advice: choose one, and stick with it. On 4/16/07, clive [EMAIL PROTECTED] wrote: What do you guys use, and what is the advantage (if ther is any) of print over echo? And I am not talking about

Re: [PHP] echo or print ?

2007-04-17 Thread Dimiter Ivanov
On 4/17/07, Christian Haensel [EMAIL PROTECTED] wrote: Good morning fellow coders I've been working with PHP for a little over 5 years now, and it even got me a cute office and a good salary... but even though I can make a living off of it, I am still wondering about a few little things.

Re: [PHP] echo or print ?

2007-04-17 Thread Christian Haensel
: Tuesday, April 17, 2007 9:48 AM Subject: Re: [PHP] echo or print ? On 4/17/07, Christian Haensel [EMAIL PROTECTED] wrote: Good morning fellow coders I've been working with PHP for a little over 5 years now, and it even got me a cute office and a good salary... but even though I can make a living

Re: [PHP] echo or print ?

2007-04-17 Thread Richard Lynch
On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: Whenever I see people put their code up for review, I realize they mostly use print instead of echo, while I am using echo 99% of the time. Actually, I can't even remember when I last used the regular print. There used to be a

Re: [PHP] echo text - anti-spam-spider measure

2007-03-01 Thread Jochem Maas
Richard Lynch wrote: You could also use %XX in HEX on the mailto: you can actually randomly mix and match hex and entity encoding, which is what the function I posted elsewhere in the thread does. On Tue, February 27, 2007 11:09 pm, Casey Chu wrote: It works. =P I tested it. Try it here!

Re: [PHP] echo text - anti-spam-spider measure

2007-03-01 Thread Casey Chu
Richard Lynch wrote: You could also use %XX in HEX on the mailto: you can actually randomly mix and match hex and entity encoding, which is what the function I posted elsewhere in the thread does. My function also does that: http://themfund.com/snippets/test.php On 3/1/07, Jochem Maas

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Jochem Maas
Stut wrote: John Taylor-Johnston wrote: Neat, and thnaks. How spam-spider-proof is it? I will try this though. But I will also try it with mailto:; in entities as well. Thanks! John !-- HERE ARE THE ENTITIES -- a

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread tedd
At 11:22 PM -0500 2/27/07, John Taylor-Johnston wrote: I need an anti-spam-spider measure for my site. Too many addresses are getting raked. In once instance, I created a flash page: http://erasethis.glquebec.org/English/contact.htm But I just don't have the time to create a flash image for

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Dave Goodchild
On 2/28/07, tedd [EMAIL PROTECTED] wrote: At 11:22 PM -0500 2/27/07, John Taylor-Johnston wrote: I need an anti-spam-spider measure for my site. Too many addresses are getting raked. In once instance, I created a flash page: http://erasethis.glquebec.org/English/contact.htm But I just don't

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread John Taylor-Johnston
Can I PHP generate a flash *.swf? How? If not how do I PHP generate a *.png or gif? Jochem Maas wrote: Stut wrote: Of course the best way is to use an image and don't link it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Richard Lynch
On Tue, February 27, 2007 10:22 pm, John Taylor-Johnston wrote: I need an anti-spam-spider measure for my site. Too many addresses are getting raked. In once instance, I created a flash page: http://erasethis.glquebec.org/English/contact.htm But I just don't have the time to create a flash

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Richard Lynch
You could also use %XX in HEX on the mailto: On Tue, February 27, 2007 11:09 pm, Casey Chu wrote: It works. =P I tested it. Try it here! =P http://themfund.com/snippets/test.php On 2/27/07, Casey Chu [EMAIL PROTECTED] wrote: I'm not sure with both of your questions. I'm too lazy to try.

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Richard Lynch
On Wed, February 28, 2007 1:20 am, Stut wrote: Of all the possible methods, entities are the easiest for bots to handle. They just need to decode the entities. More reliable methods involve using javascript to write out the mailto: tag. Do it in several statements. But even then, some of the

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Casey Chu
http://themfund.com/snippets/test.php Has %HEX, #entity;, and even a entity version of the hex! On 2/28/07, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, February 28, 2007 1:20 am, Stut wrote: Of all the possible methods, entities are the easiest for bots to handle. They just need to decode

Re: [PHP] echo text - anti-spam-spider measure

2007-02-27 Thread John Taylor-Johnston
How do I encode it? And would the href tag work? Casey Chu wrote: ^ So put that into a a href tag. On 2/27/07, Casey Chu [EMAIL PROTECTED] wrote: Try using Javascript? Or use all entities? For example: mailto:php-general@lists.php.net would turn into

Re: [PHP] echo text - anti-spam-spider measure

2007-02-27 Thread Casey Chu
I'm not sure with both of your questions. I'm too lazy to try. Untested: But to encode it, you would use preg_replace_callback('~([\d\w])~', create_function('$a', 'return #.ord($a[0]).;;'), $theEmail); Hopefully that works? On 2/27/07, John Taylor-Johnston [EMAIL PROTECTED] wrote: How do I

Re: [PHP] echo text - anti-spam-spider measure

2007-02-27 Thread Casey Chu
It works. =P I tested it. Try it here! =P http://themfund.com/snippets/test.php On 2/27/07, Casey Chu [EMAIL PROTECTED] wrote: I'm not sure with both of your questions. I'm too lazy to try. Untested: But to encode it, you would use preg_replace_callback('~([\d\w])~', create_function('$a',

Re: [PHP] echo text - anti-spam-spider measure

2007-02-27 Thread Casey Chu
^ So put that into a a href tag. On 2/27/07, Casey Chu [EMAIL PROTECTED] wrote: Try using Javascript? Or use all entities? For example: mailto:php-general@lists.php.net would turn into

Re: [PHP] echo text - anti-spam-spider measure

2007-02-27 Thread Casey Chu
Try using Javascript? Or use all entities? For example: mailto:php-general@lists.php.net would turn into #109;#97;#105;#108;#116;#111;#58;#112;#104;#112;#45;#103;#101;#110;#101;#114;#97;#108;#64;#108;#105;#115;#116;#115;#46;#112;#104;#112;#46;#110;#101;#116; On 2/27/07, John Taylor-Johnston

Re: [PHP] echo text - anti-spam-spider measure

2007-02-27 Thread John Taylor-Johnston
Neat, and thnaks. How spam-spider-proof is it? I will try this though. But I will also try it with mailto:; in entities as well. Thanks! John !-- HERE ARE THE ENTITIES -- a

Re: [PHP] echo text - anti-spam-spider measure

2007-02-27 Thread Stut
John Taylor-Johnston wrote: Neat, and thnaks. How spam-spider-proof is it? I will try this though. But I will also try it with mailto:; in entities as well. Thanks! John !-- HERE ARE THE ENTITIES -- a

Re: [PHP] ECHO

2006-12-19 Thread Jochem Maas
Fahad Pervaiz wrote: ECHO is a language construct but still is there any work around to override it or change its functionality??? if your willing to hack the php source then you can pretty much do whatever you want; that said there is no mechanism for overriding echo or any other language

Re: [PHP] ECHO

2006-12-18 Thread Casey Chu
Why do you need to change its functionality? On 12/18/06, Fahad Pervaiz [EMAIL PROTECTED] wrote: ECHO is a language construct but still is there any work around to override it or change its functionality??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] ECHO

2006-12-18 Thread Chris
Fahad Pervaiz wrote: ECHO is a language construct but still is there any work around to override it or change its functionality??? Nope. You're stuck with how it works now. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] ECHO $variable

2006-10-10 Thread benifactor
thank you for schooling me :) i learn something new everyday! - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: benifactor [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Monday, October 09, 2006 11:02 AM Subject: Re: [PHP] ECHO $variable On Mon, October 9, 2006 7

Re: [PHP] ECHO $variable

2006-10-09 Thread Richard Lynch
On Sun, October 8, 2006 1:39 am, Ron Piggott (PHP) wrote: In one of my scripts I have input type=text name=message_title size=40 maxlength=80 value=?echo $saved_message_title;? where $saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He cares about you --- note the

Re: [PHP] ECHO $variable

2006-10-09 Thread Richard Lynch
On Mon, October 9, 2006 7:45 am, benifactor wrote: the way i posted worked fine with out either... he doesn't need to use these to format the way his output is displayed, he only needs to use the proper php syntax if i am correct. You were wrong, and you're still wrong. :-) Try it and see.

Re: [PHP] ECHO $variable

2006-10-08 Thread benifactor
you should try this... $saved_message_title = '1 Peter 5:7 Cast all your cares on Him for He cares about you'; - Original Message - From: Ron Piggott (PHP) [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Sent: Saturday, October 07, 2006 11:39 PM Subject: [PHP] ECHO $variable

Re: [PHP] ECHO $variable

2006-10-08 Thread Penthexquadium
On Mon, 9 Oct 2006 00:23:00 -0700, benifactor [EMAIL PROTECTED] wrote: you should try this... $saved_message_title = '1 Peter 5:7 Cast all your cares on Him for He cares about you'; - Original Message - From: Ron Piggott (PHP) [EMAIL PROTECTED] To: PHP General

Re: [PHP] ECHO $variable

2006-10-08 Thread benifactor
, October 08, 2006 1:41 AM Subject: Re: [PHP] ECHO $variable On Mon, 9 Oct 2006 00:23:00 -0700, benifactor [EMAIL PROTECTED] wrote: you should try this... $saved_message_title = '1 Peter 5:7 Cast all your cares on Him for He cares about you'; - Original Message - From: Ron Piggott

Re: [PHP] ECHO $variable

2006-10-08 Thread Chris Shiflett
Ron Piggott wrote: When this is displayed on the screen $saved_message_title reads 1 Peter 5:7 I am assuming the closes the value= How may I echo this to the screen and have the full text be displayed, not just 1 Peter 5:7 ? http://php.net/htmlentities You should really be using

Re: [PHP] ECHO $variable

2006-10-08 Thread John Wells
? Then your solution breaks anyway... Like Chris said, you should be using htmlentities for output... John W - Original Message - From: Penthexquadium [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, October 08, 2006 1:41 AM Subject: Re: [PHP] ECHO $variable On Mon, 9 Oct

Re: [PHP] Echo a value from an arrays position

2006-05-07 Thread Jochem Maas
Dave Goodchild wrote: This may clarify - in php, integer and associate arrays are created arbitrarily, ie keys can be numbers or strings. So, either create an array like this: array('1' = 'first element', '2' = 'second element'); if I'm not mistaken the above example will result in an

Re: [PHP] Echo a value from an arrays position

2006-05-05 Thread Eric Butera
On 5/4/06, Brad Bonkoski [EMAIL PROTECTED] wrote: Will this also work with an associative array? If this is what he is talking about, I tried it and it does not work I put this together though and it works, not sure if it is the *best* way though... ?php $colors =

RE: [PHP] Echo a value from an arrays position

2006-05-04 Thread Jay Blanchard
[snip] Is there any way to call for an element value in an array by the position? Like position 2 in the array and not the key name. [/snip] I hate to say this, but you really need to RTFM http://www.php.net/array To get a value from position 2 in an array you use $arrayName[1] (all array

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Brad Bonkoski
Will this also work with an associative array? If this is what he is talking about, I tried it and it does not work I put this together though and it works, not sure if it is the *best* way though... ?php $colors = array('white'='#ff','black'='#00','blue'='#ff');

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Jonas Rosling
Seem like your missunderstanding me. I'm not using an orignal array. I'm using an map-array. $array = ('element' = 'value'); // Jonas Den 06-05-04 14.29, skrev Jay Blanchard [EMAIL PROTECTED]: [snip] Is there any way to call for an element value in an array by the position? Like position

RE: [PHP] Echo a value from an arrays position

2006-05-04 Thread Jay Blanchard
[snip] $colors = array('white'='#ff','black'='#00','blue'='#ff'); [/snip] What happens when you echo $colors[1]? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Brad Bonkoski
I get nothing do you get something different? Jay Blanchard wrote: [snip] $colors = array('white'='#ff','black'='#00','blue'='#ff'); [/snip] What happens when you echo $colors[1]? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Echo a value from an arrays position

2006-05-04 Thread Jay Blanchard
[snip] I get nothing do you get something different? [/snip] Not even 'array'? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Jonas Rosling
Nothing. // Jonas Den 06-05-04 14.40, skrev Jay Blanchard [EMAIL PROTECTED]: [snip] $colors = array('white'='#ff','black'='#00','blue'='#ff'); [/snip] What happens when you echo $colors[1]? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Brad Bonkoski
Nope... dead air. Of course getting an indexed value into an associative array seems a bit odd to me... maybe Jonas could shed some light on why he would go this route... Jay Blanchard wrote: [snip] I get nothing do you get something different? [/snip] Not even 'array'? -- PHP

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Dave Goodchild
This may clarify - in php, integer and associate arrays are created arbitrarily, ie keys can be numbers or strings. So, either create an array like this: array('1' = 'first element', '2' = 'second element'); and call by the key! On 04/05/06, Jonas Rosling [EMAIL PROTECTED] wrote: Is

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread John Wells
On 5/4/06, Brad Bonkoski [EMAIL PROTECTED] wrote: Will this also work with an associative array? If this is what he is talking about, I tried it and it does not work I think you're correct. This is because PHP arrays are a mash-up (as Jochem put it) of numerical

  1   2   3   >