I am having the problem with php printing
print true; // prints 1
print false // dosent print anything
Thanks!!! 7 1309
*** raashid bhatt escribió/wrote (Wed, 13 Aug 2008 10:06:34 -0700 (PDT)):
I am having the problem with php printing
print true; // prints 1
print false // dosent print anything
print needs strings so this is a conversion from boolean into string. These
are the rules: http://es2.php.net/manual/en/languag...string.casting
"A boolean TRUE value is converted to the string "1". Boolean FALSE is
converted to "" (the empty string). This allows conversion back and forth
between boolean and string values."
You may find var_dump() useful.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--
print's overrated, good ol echo, tried and true and also fast than
print (if ever speed did count)
..oO(The Hajj)
>print's overrated, good ol echo, tried and true and also fast than print (if ever speed did count)
The only little difference is in semantics, not in speed. In practice it
won't matter anyway.
Micha
..oO(raashid bhatt)
>I am having the problem with php printing
print true; // prints 1 print false // dosent print anything
If casted to a string, a FALSE will become the empty string, which makes
perfect sense and is described in the manual.
Micha
On Aug 13, 3:10 pm, Michael Fesser <neti...@gmx.dewrote:
.oO(The Hajj)
print's overrated, good ol echo, tried and true and also fast than
print (if ever speed did count)
The only little difference is in semantics, not in speed. In practice it
won't matter anyway.
Micha
I'm going off language construct versus function but yeah, I've never
ran into where I've noticed a difference.
..oO(The Hajj)
>On Aug 13, 3:10 pm, Michael Fesser <neti...@gmx.dewrote:
>.oO(The Hajj)
>print's overrated, good ol echo, tried and true and also fast than print (if ever speed did count)
The only little difference is in semantics, not in speed. In practice it won't matter anyway.
Micha
I'm going off language construct versus function but yeah, I've never ran into where I've noticed a difference.
JFTR: Both are language constructs. Indeed 'print' behaves more like a
function, though (it sets a return value), but still doesn't require
parentheses.
Micha
On Aug 13, 3:19 pm, Michael Fesser <neti...@gmx.dewrote:
.oO(The Hajj)
On Aug 13, 3:10 pm, Michael Fesser <neti...@gmx.dewrote:
.oO(The Hajj)
print's overrated, good ol echo, tried and true and also fast than
print (if ever speed did count)
The only little difference is in semantics, not in speed. In practice it
won't matter anyway.
Micha
I'm going off language construct versus function but yeah, I've never
ran into where I've noticed a difference.
JFTR: Both are language constructs. Indeed 'print' behaves more like a
function, though (it sets a return value), but still doesn't require
parentheses.
Micha
hmm, I'll have to go inform someone of this, was told print = function This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Programatix |
last post by:
Hi,
I am working on the PrintDocument, PrintDialog, PageSetupDialog and
PrintPreviewControl components of Visual Studio .NET 2003. My developement
machine is running Windows XP.
There are...
|
by: Programatix |
last post by:
Hi,
I am working on the PrintDocument, PrintDialog, PageSetupDialog and
PrintPreviewControl components of Visual Studio .NET 2003. My developement
machine is running Windows XP.
There are...
|
by: DCraig |
last post by:
I'm having problems printing to a line printer from both Crystal Reports and
SQL Server reporting services using dotnet. When I try and print a report
from an application with Crystal I get the...
|
by: Stefania Scott |
last post by:
I am trying to print a word document from Access. The code I've
written works well in my computer but does not in the one were it is
needed.
Here the piece of code:
'doc path
strObjectPath =...
|
by: C-Services Holland b.v. |
last post by:
Hi all,
I've run into a problem trying to print from vb.net (2002) in Windows
98. To test it I've setup a single form with a button and the following
code:
'the form has a button called...
|
by: hamil |
last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview
control, the PageSetup control, and the Print dialog control. The code
attached is a concatination of two examples taken out...
|
by: Teemu |
last post by:
I have an application created with VB6 and now I'm converting it to VB 2005.
Conversion is not so simple because printing is so much different.
In my app I have Timer-component, which is creates...
|
by: Sukh |
last post by:
Hi
I am stuck with a problem Can anyone help me out from this...
I am printing a report on pre-printed continue paper using dot-matrix
printer using vb.net.
Data is printing on all the...
|
by: Neo Geshel |
last post by:
Greetings.
BACKGROUND:
My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are
delivered as application/xhtml+xml for all non-MS web clients, and as
text/xml for all MS web...
|
by: Brett |
last post by:
I have an ASP.NET page that displays work orders in a GridView. In that
GridView is a checkbox column. When the user clicks a "Print" button, I
create a report, using the .NET Framework printing...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |