Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IF statement php

Posted on 2015-02-07
4
Medium Priority
?
245 Views
Last Modified: 2015-02-07
Can someone please tell me how to rewrite this statement so that it represents a value:

<?php if (!empty($row_artGallery[artgal_fsize])

example:
<?php if ($row_artGallery[artgal_fsize]) = "cm"
0
Comment
Question by:doctorbill
  • 2
4 Comments
 
LVL 44

Accepted Solution

by:
Chris Stanyon earned 1000 total points
ID: 40595882
Comparison in PHP is the double equals, and the whole IF statement should be wrapped in parenthesis

<?php if ($row_artGallery['artgal_fsize'] == "cm") {
...
}

Open in new window

0
 
LVL 10

Assisted Solution

by:aboo_s
aboo_s earned 1000 total points
ID: 40595886
<?php if ($row_artGallery[artgal_fsize] .src=="/images/flower.jpg") echo "found!";
0
 

Author Comment

by:doctorbill
ID: 40595907
perfect - thanks
0
 

Author Closing Comment

by:doctorbill
ID: 40595910
solution
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question