![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: May 2003
Location: look behind you
Posts: 2,477
|
![]() Need to fix this in a script and the developer is MIA, any help greatly appreciated. I have this line:
Code:
<?php echo $product['niche'][0]; ?> However, if I don't input something in that field, the design gets screwed since the divs are floated or whatever, so what I need is just something like Code:
if $product['niche'][0]; is filled, then use it, otherwise add N/A ![]() Of course, thank you in advance ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: Los Angeles
Posts: 942
|
PHP Code:
![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: May 2003
Location: look behind you
Posts: 2,477
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: Los Angeles
Posts: 942
|
PHP Code:
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
|
Quote:
PHP Code:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: May 2003
Location: look behind you
Posts: 2,477
|
thank you guys, that worked like a charm!
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Code:
if( isset($product['niche'][0]) && $product['niche'][0] != ''){ echo $product['niche'][0]; }else{ echo 'N/A'; } |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,564
|
This is better.
__________________
Make Money with Porn |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
The Dirty Frenchman
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
|
print !empty($product['niche'][0]) ? $product['niche'][0] : "N/A";
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Damn Right I Kiss Ass!
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
|
Have we consulted the sanitation department on this yet?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Junior Achiever
Industry Role:
Join Date: Nov 2004
Location: Walled Garden
Posts: 17,066
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |