473,473 Members | 1,906 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

echo with question mark

Hi!

What does it mean:

<?php echo (isset($_POST['work_hours_total']) ? $_POST['work_hours_total'] :
""); ?>

I don't understand logic of that expression. Anybody can help me?

Leszek

Aug 26 '06 #1
3 11902
On Sat, 26 Aug 2006 19:34:41 +0200, "news.tpi.pl" <ad***@seldom.euwrote:
>What does it mean:

<?php echo (isset($_POST['work_hours_total']) ? $_POST['work_hours_total'] :
""); ?>

I don't understand logic of that expression. Anybody can help me?
http://www.php.net/manual/en/languag...arison.ternary

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Aug 26 '06 #2
I have found the solution:
echo $some_var ? print 'true': print 'false';
Leszek
Użytkownik "news.tpi.pl" <ad***@seldom.eunapisał w wiadomo¶ci
news:ec**********@nemesis.news.tpi.pl...
Hi!

What does it mean:

<?php echo (isset($_POST['work_hours_total']) ? $_POST['work_hours_total']
: ""); ?>

I don't understand logic of that expression. Anybody can help me?

Leszek

Aug 26 '06 #3

try diz website>>www.tizag.com

Aug 28 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: windandwaves | last post by:
Hi Folk My question is: echo all the time vs echo at the end - what is faster Let me explain I used to write pages like this: echo "<head> ";
5
by: nek | last post by:
Hi, Is it possible to echo a newline in window shell script? eg. @echo this is the 1st line @echo ??? @echo this is the 3rd line The result expected:
7
by: jwatson | last post by:
hey guys need help or some guidances please. Basically its a complicated looping and relational question. Write a program to calculate te percentage score of the mark of the students.The program...
25
by: Jon Slaughter | last post by:
I have some code that loads up some php/html files and does a few things to them and ultimately returns an html file with some php code in it. I then pass that file onto the user by using echo. Of...
3
by: 2Dcube | last post by:
Hello, I'm doing some PHP and MySQL, and have a very simple question. How do you echo a long space? When I use echo " ": , it gets echo'd as only one space... Using echo " "; echo " ";...
4
by: maria | last post by:
I only use C++ with Visual Studio 6.0 for string manipulations in thousands of HTML pages on my website. Many times, the output files of many of my C++ programs contain a spanish question mark (ż)...
2
by: runway27 | last post by:
i have a question about using header("Location: filename.html"); in php with my present code i have a few echo statements followed by header("Location: filename.html"); because i have echo ...
1
by: sheel331 | last post by:
Hello, I am new to coding in PHP, and had a question about a simple thing: I am trying to echo out the elements of an array for a sidenav in one of my HTML pages, and I can't seem to figure out...
11
by: Twayne | last post by:
Hi, Irrelevant question time, probably: Is there any advantage/reason to use one format over the other for the following two types of echo statements? 1. echo "error is " . $error; 2. ...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.