![]() |
![]() |
![]() |
||||
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
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,129
|
![]() So I have a table that has a row of URLs in it, some of the rows do not have any data in them.
When outputting the data to a page, how can I make it so that the code where that url should appear dissapears from the page? This is the code I'm using: Quote:
Basically, if the row for 'Two' has no data in it, how do i get it to just vanish from the 4 options? So instead of: One | Two | Three | Four It shows: One | Three | Four The data calls are in an array at the top of the page if that helps any?
__________________
SOMETHING EXTREME IS COMING SOON! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Natalie K
Industry Role:
Join Date: Apr 2010
Location: Spain
Posts: 19,245
|
no, my bad, what i said was wrong from what iŽd read...
bounce for you, good luck ![]()
__________________
My official site ![]() ![]() ![]() Skype: gspotproductions - "Converting traffic into income since 2005" |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,093
|
Hi,
You can put a simple IF before each row Quote:
You can also use trim($var) and strlen($var) > 0 if there is a chance that your DB has rows with only spaces by mistake. 'The data calls are in an array at the top of the page if that helps any?' If you have everything in your array, you can simply use the function implode() and you are good to go. Show me a print_r of your array and I can help you further. Cheers, z |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,129
|
This is literally all the code I have in the page (its real basic).
Quote:
__________________
SOMETHING EXTREME IS COMING SOON! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,129
|
That will work even if all im pulling into the page from the database is the URL itself?
__________________
SOMETHING EXTREME IS COMING SOON! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,129
|
That IF statement works perfectly for what I needed, thank you so much for the code 👍
__________________
SOMETHING EXTREME IS COMING SOON! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,093
|
Yeah, looking at your code, the IF function is what you are looking for
![]()
__________________
php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
Quote:
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Registered User
Industry Role:
Join Date: Feb 2022
Posts: 40
|
Correct. Proper error checking is a must for PHP.
__________________
Cheap VPS/Shared Hosting: RackNerd Discord: Clown#5147 Projects: JuicySluts Website: Clownonymous Other Domains: JuicyBate - HornyFeed - Pimp Ink - Fansily Skills: API/HTML/CSS/JS/PHP/PYTHON |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,093
|
Quote:
![]()
__________________
php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |