$sql = "SELECT first_name, last_name, address, state, zip_code, country,
company, occupation, telephone, fax, email, entry_name, password, package,
registration_date, valid_until, max_users
FROM $table_name
WHERE uid = \"$uid\"
";
$result = @mysql_query($sql,$connectio
Hey there,
sorry if this has been covered before. I am not sure if this makes a difference but I
see in some books echo written as:
echo ("Hello");
and in others just:
echo "Hello";
Do the brackets make a difference.
Thanks
Hi All:
I need to print out several paragraphs of information stored in a MySql
field to a web page. To do this I am using:
$db = mysql_connect("localhost", "dbase", "password");
mysql_select_db("dbase",$db);
$sql = "SELECT update FROM members WHERE username = 'Don'";
$query = mysql_query($sql)
I am fairly new to PHP Scripting, and I am learning from a book.
Throughout the book, print is used as the basic command to output
text/variables.. yet I see almost everyone in here uses echo. Might I ask
what the differences of the two are, and if there are any benefits of using
one over the othe
I have a PHP file that I show values of variables in several parts, and for
that I put in almost the whole page
echo"... HTML code + PHP codes (variables, functions, etc.) + HTML code...
";
I don't know nor why I put, I think it went to not to be finishing and
beginning PHP parts as:
HTML
Hi again!
Thanks for the reply!
I still have another question:
I want to create a recycleable code by printing a set of html code which I
copied and paste from my html edittor.
however because there are lots of quotation marks on the html code it result
an error page.
here is part of the html
I have "Profession PHP Programming" and I see that echo() and print()
are used alomst interchangeably. When should each one be used?
Also, I see "http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators,
I know it is a kind of stupid question but I was trying to figure out
the difference between "Echo" and "Print" and I didn't find it...Could
anybody explain that to me??
Thank you
Felipe Lopes
MailBR - O e-mail do Brasil -- http://www.mailbr.com.br
Faça já o seu. É gratuito!!!
--
PHP
>sorry if this has been covered before. I am not sure if this makes a
difference but I see in some books echo written as:
>
>echo ("Hello");
>
>and in others just:
>
>echo "Hello";
>
>Do the brackets make a difference.
Hmmm, nope. You can also write print "Hello"; or print("Hello");
/Johan
--
; From: Louis Brooks [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, May 19, 2001 8:01 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] echo question
>
>
> Hi All:
>
> I need to print out several paragraphs of information stored
> in a MySql
> field to a web page. To do this
Why should I use printf instead of echo and vice versa?
As for today I use printf mostly but I don't know why.
brother
Mail: [EMAIL PROTECTED]
UIN: 4722160
Web: http://motd.st
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
You can read the notes lower on the page here to get a good idea:
http://www.php.net/manual/en/function.print.php
Jeff Oien
> I am fairly new to PHP Scripting, and I am learning from a book.
> Throughout the book, print is used as the basic command to output
> text/variables.. yet I see almost e
Thanks!
Helped a lot.
-Andy
Jeff Oien <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can read the notes lower on the page here to get a good idea:
> http://www.php.net/manual/en/function.print.php
> Jeff Oien
>
> > I am fairly new to PHP Scripting, and I am
hp stuff.
Neil
- Original Message -
From: André Felix Miertschink <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 12:04 AM
Subject: [PHP] echo " HTML code ";
> I have a PHP file that I show values of variables in several parts, and
fo
> ok.. well an echo goes
> echo "what u want to echo";
> so u would do it this way
>
> echo "html code.. making sure u dont use a " in any of ur html code";
> php stuff
> echo "$phpvariable & more html code.. if u want to use a " use a '
> instead.";
> more php stuff.
>
If u want to use " use \"
Personal, I think I expressed myself wrong, because it is like this that I
use, but the one that I want to know, if the echo" HTML code " it is much
slower than if I put the HTML code out of the PHP block.
Can these several echo's harm the processing of the server? Can that turn
slow the vis
I was just wondering if there's a way to use echo with session variables.
When I try to do this:
it gives me this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in /home/storings/public_html/uslogin.php on line 134
Am I doing something wrong or is ther
Someone on this list once mentioned a performance difference between using
echo and print(). Is there any evidence to back this up? I am really
curious to see if it would make a difference to use one over the other.
--Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-ma
On 2002.01.09 02:00:55 -0600 universal2001 wrote:
> so I tired to use (echo) like this:
>
> echo "
>
> border="0">
>
>
> src="img_heading/index_r1_c1.gif" width="639" height="5" border="0">
> border="0">
>
>
> src="img_heading/index_r2_c1.gif" width="25" height
ke sure at the end of your last addition line with . that you end the
line with a ;
E.g your last line would be
."\n";
That should help you.
Andrew Duck
-Original Message-
From: universal2001 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 9 January 2002 7:01 PM
To: [EMAIL PROTECT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Steven Cayford) wrote:
> You can tell php to treat quotes as text by escaping
> them: putting a \ in front of them like this:
>
> echo "";
>
> Or you could drop out of php mode entirely to do your html like this:
>
> ...php stuff here ...
>
I simply use single quotes for html and double quotes for PHP.
echo "";
works for me.
Steve
On Tue, 8 Jan 2002, Steven Cayford wrote:
> On 2002.01.09 02:00:55 -0600 universal2001 wrote:
>
> > so I tired to use (echo) like this:
> >
> >
Hy,
universal2001 wrote:
> Hi again!
>
> Thanks for the reply!
>
> I still have another question:
>
> so I tired to use (echo) like this:
>
> echo "
>
> border="0">
>
>
> src="img_heading/index_r1_c1.gif" width="639" height="5" border="0">
> border="0">
>
>
>
Hellorghh !!!
You'd better do like this :
echo "
Le Mercredi 9 Janvier 2002 13:05, Henning Sprang a écrit :
> Hy,
>
> universal2001 wrote:
> > Hi again!
> >
> > Thanks for the reply!
> >
> > I still have another question:
> >
> >
> > so I tired to use (echo) like this:
> >
> > echo "
> >
> >
Nicolas Costes wrote:
> Hellorghh !!!
> You'd better do like this :
>
> echo "
>
just another one - but i am too out of practice with html standarts to
know if this is compliant ( a browser showing a result doesn't
neccessary mean it's standarts compliant!)
henning
--
PHP General Mai
Yes, you're right !!!
some browsers like IE will accept even , , , and some like Opera will only understand :
;-))
Le Mercredi 9 Janvier 2002 14:17, Henning Sprang a écrit :
> Nicolas Costes wrote:
--
( * >Nicolas Costes,
//\\ IUT de La Roche / Yon
( \/ ) [EMAIL PROTECTED]
<
Hello,
In addition to Henning Sprang's fine solutions, you can also do the following (given
you use PHP 4);
$xmp_text
EOF;
?>
Note that the {} around your variables are optional, they will not be included in the
output but can be used to avoid confusion.
greets,
bvr.
On Wed, 9 Ja
on 1/9/02 8:17 AM, Henning Sprang at [EMAIL PROTECTED] appended the
following bits to my mbox:
> just another one - but i am too out of practice with html standarts to
> know if this is compliant ( a browser showing a result doesn't
> neccessary mean it's standarts compliant!)
FYI:
By default,
>From recent posts:
http://www.zend.com/zend/tut/using-strings.php
also see the doc for print in the PHP manual:
http://www.php.net/manual/en/function.print.php
Jeff Oien
> I have "Profession PHP Programming" and I see that echo() and print()
> are used alomst interchangeably. When should each o
) and that is why
the yprobably coulnd't stick to one single style : couse they have some deep
preferences.
Anyway, "mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 12:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] echo vs print
I have "Profession PHP Programming" and I
On Thu, 8 Feb 2001, Todd Cary wrote:
> I have "Profession PHP Programming" and I see that echo() and print()
> are used alomst interchangeably. When should each one be used?
What is the difference between echo and print ?
---
Maxim Maletsky wrote:
> Anyway, " " compatibility.
I believe http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Right, this is also true
Cheers,
Maxim Maletsky
-Original Message-
From: Ben Peter [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 10, 2001 2:10 AM
To: Maxim Maletsky
Cc: 'Todd Cary'; [EMAIL PROTECTED]
Subject: Re: [PHP] echo vs print
Maxim Maletsky wrote:
As I understand it, echo is somewhat of an language construct and print is a
function.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Echo and Print
I know it is a kind of stupid
New Homepage!
--
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 26. janúar 2001 11:37
To: [EMAIL PROTECTED]
Subject: [PHP] Echo and Print
I know it is a kind of stupid question but I was trying to figure out
the difference between "Echo&q
What is the difference between echo and print ?
---
http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/41
Philip
On 26 xxx -1 [EMAIL PROTECTED] wrote:
> I know it is a kind of stupid question but I was trying to figure
print is a function where u can add html tags like
print(" hello $name") however echo is a command where we can't
include html tags ! echo "hello".$name
>From: Philip Olson <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED]
>Subject:
EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 12:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Echo and Print
print is a function where u can add html tags like
print(" hello $name") however echo is a command where we can't
include html tags ! echo "hello".$name
--
> print is a function where u can add html tags like
> print(" hello $name") however echo is a command where we can't
> include html tags ! echo "hello".$name
This is VERY incorrect, please read this :
> >What is the difference between echo and print ?
> >---
Not sure if this helps but how about?
array("31","has 1 day holiday"),
February=>array("28","is very cold"));
for($i=0; $i < count($months); $i++) {
while(list($key,$val)=each($months)) {echo $key.' has
'.$val[0].' days, it '.$val[1].' ';}
}
?>
On 16-Jul-01 brother wrote:
> Why should I use printf instead of echo and vice versa?
>
printf print-formated
$a=12.3456;
echo $a, '';
printf('%1.2f', $a);
12.3456
12.34
> As for today I use printf mostly but I don't know why.
You prolly mean print; There may be some minor differences fro
i seem to remember reading somewhere that print acts like (is) a function,
presumably returning false if it cannot print to screen, whereas echo just
dumps it.
also you can drop vars in print like
print "you have $points points";
whereas to echo it you'd have to concatenate the string.
Steve
Actually, you can do the same thing with echo.
echo "you have $points points";
As I understand it, echo is not a function it's a
language something or other, supposedly it runs
slightly faster than print given the same output.
however, given it's Monday, I could be wrong.
rm
>
> also you can
echo and print both work.
> -Original Message-
> From: Steve Brett [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 16, 2001 11:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] echo vs printf
>
>
> i seem to remember reading somewhere that print acts like
> As I understand it, echo is not a function it's a
> language something or other, supposedly it runs
> slightly faster than print given the same output.
time_start = $this->GetMicroTime();
}
function Stop(){
$time_end = $this->GetMicroTime();
$this->time_delta
I don't know what to say, my comment was based on
http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40
note the author.
I ran your code in both windows and linux and got
faster speeds, on a regular basis, for echo. That
said, the speed differences were not great(minor is a
good descript
"whereas to echo it you'd have to concatenate the string." false
you don't have to concat strings with echo you can print vars the same way as print
regards
16/07/01 17:48:43, "Steve Brett" <[EMAIL PROTECTED]> wrote:
>i seem to remember reading somewhere that print acts like (is) a function,
>p
On Thu, 21 Mar 2002, David Johansen wrote:
> I was just wondering if there's a way to use echo with session variables.
> When I try to do this:
>
> if (isset($_SESSION['x_Email']))
> echo "value=\"$_SESSION['x_Email']\"";
> ?>
The issue is with the syntax you're using to refer to arrays within
Thanks that fixed the problem, but I have a question then. Am I supposed to
put the ' in the $_SESSION[] in the normal parts of code. Thanks,
Dave
"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 21 Mar 2002, David Johansen wrote:
> > I was
;
-Kevin
-Original Message-
From: David Johansen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 4:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] echo and Session Variables
Thanks that fixed the problem, but I have a question then. Am I supposed
to
put the ' in the $_SESSION
> -Kevin
>
> -Original Message-
> From: David Johansen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 21, 2002 4:26 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] echo and Session Variables
>
> Thanks that fixed the problem, but I have a question then. Am I su
; pointer to
> the index.
>
> Example..
> $myarray = array ('myvar' => 'myvalue');
> echo $myarray[myvar]; // prints out 'myvalue'
> -Kevin
>
> -Original Message-
> From: David Johansen [mailto:[EMAIL PROTECTED]]
> Sent: Thursda
On Thursday, March 21, 2002, at 06:26 PM, David Johansen wrote:
> Thanks that fixed the problem, but I have a question then. Am I
> supposed to
> put the ' in the $_SESSION[] in the normal parts of code. Thanks,
> Dave
You should use either single quotes or double quotes in any associative
i
not as a criticism, but this is among the top 10 questions asked ...or used
to be for a while...anyway, there's tons of info on the mailing lists,
marc.theaimsgroup.com
the short answer is that echo is SLIGHTLY faster being a language construct
rather than a function...then again, i believe i reme
ot;Jack Dempsey" <[EMAIL PROTECTED]>
To: "Jon Niola" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 11:50 PM
Subject: Re: [PHP] echo vs. print() performance?
> not as a criticism, but this is among the top 10 questions asked ...or
used
Here's an interesting problem.
The following only prints the first letter of the name
for ($i=0; isset($empid[$i]); $i++) {
echo "$empid[$i] $name[$i]";
}
But if I change the variable $name to $employeename throughout the script it
displays fine.
$empid[] and $name[] are both assigned ea
Dear List,
I have this sql command that grabs a result of 3 tables. What i want is if
there's a way to do a while printing the site and url and after it's finish
begin, printing site_2 and url_2.
SELECT celebridades.*, links_relacionados.Nome_Link as
site,links_relacionados.Url_link as url, fanc
Hope this doesn't sound too lame from the newbie. I have a form, code shown
here that has input fields for each row. I'd like to do two things:
1.) Change the REALNAME field to just echo the row & not have an input field
(I've tried to do this & it just echoes my code back to me).
2.) Integrate
please post more code, ie where $name is set.
in the mean time try this, shouldnt help but might
foreach($empid as $pos => $val)
{
echo "{$empid[$pos]} {$name[$pos]}";
}
--
Chris Lee
[EMAIL PROTECTED]
""Tom Harris"" <[EMAIL PROTECTED]> wrote in message
98tcfg$bn3$[EMAIL PROTECTED]">
Are you sure $name is an array. t appears to be a string and the $name[$i]
references one character in that string
mal
-Original Message-
From: Tom Harris [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 15:50
To: [EMAIL PROTECTED]
Subject: [PHP] echo only displays first character
If I understand you correctly, use Javascript to open a second browser
window for url_2.
Miles Thompson
At 02:49 PM 1/10/2002 -0200, Rodrigo Peres wrote:
>Dear List,
>
>I have this sql command that grabs a result of 3 tables. What i want is if
>there's a way to do a while printing the site and
Sorry, Ithink that I not explain right. I nedd to create a list, something
like:
url site
url site
url_2 site_2
url_2 site_2
When the values returned by url and site finished them proceed to url_2 and
site_2 values.
Thank's
Rodrigo
on 1/10/02 3:16 PM, Miles Thompson at [EMAIL PROTECTE
Two ways actually ...
You could execute two separate SQL statements, and process them one after
another.
or
You could process your result set, echo()'ing or print()'ing the first
elements of the result set, then go back to the beginning and do the second
set, something like this ...
for ($i
Hi,
How can I echo some text such as "Processing, please wait..." whilst the PHP
script runs. Rather than displaying a blank screen with the results being
echoed once the script has fully completed.
Thanks,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
I include another script-file with include_once.
Now the output of my PHP-Vars ($PHP_SELF, $REQUEST_URI, $DOCUMENT_ROOT) is
empty. In my parent-scripts the output works fine, but in the include is
neither outputs the parent-data nor the include-data.
--
PHP General Mailing List (http://www.php.
> How can I echo some text such as "Processing, please wait..." whilst the
PHP
> script runs. Rather than displaying a blank screen with the results being
> echoed once the script has fully completed.
echo ("\"Processing, please wait...\"");
flush();
//processing code here...
--
Jon Farmer
Sy
On Monday, March 25, 2002, at 10:39 AM, Chris wrote:
> How can I echo some text such as "Processing, please wait..." whilst
> the PHP
> script runs. Rather than displaying a blank screen with the results
> being
> echoed once the script has fully completed.
A hackish and inelegant way to do
Steve Brett <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 10:48 AM
Subject: Re: [PHP] echo vs printf
> i seem to remember reading somewhere that print acts like (is) a function,
> presumably returning false if it cannot print to screen, whereas echo
just
>
Hi,
> I include another script-file with include_once. Now the output
> of my PHP-Vars ($PHP_SELF, $REQUEST_URI,
> $DOCUMENT_ROOT) is empty. In my parent-scripts the
> output works fine, but in the include is neither outputs the
> parent-data nor the include-data.
try echo $GLOBALS["PHP_SELF"].
> Hi,
>
> > I include another script-file with include_once. Now the output
> > of my PHP-Vars ($PHP_SELF, $REQUEST_URI,
> > $DOCUMENT_ROOT) is empty. In my parent-scripts the
> > output works fine, but in the include it neither outputs the
> > parent-data nor the include-data.
>
> try echo $GLO
70 matches
Mail list logo