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:
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
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
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
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 -
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
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];
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:
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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()
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
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
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
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:
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:
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
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!
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
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
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
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
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
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
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')
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(
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
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
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',
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
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
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
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
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
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
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);
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
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
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
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
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
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
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
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.
: 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
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
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!
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
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
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
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
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
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
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.
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
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
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
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
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',
^ 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
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
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
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
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
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:
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
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
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
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.
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
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
, 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
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
?
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
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
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 =
[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
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');
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
[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
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:
[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
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:
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
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
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 - 100 of 226 matches
Mail list logo