![]() |
Row with no contents, how to remove in output?
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? |
no, my bad, what i said was wrong from what iŽd read...
bounce for you, good luck :thumbsup |
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 |
Quote:
Quote:
|
Quote:
|
That IF statement works perfectly for what I needed, thank you so much for the code 👍
|
Yeah, looking at your code, the IF function is what you are looking for :)
|
Quote:
|
Quote:
|
Quote:
|
All times are GMT -7. The time now is 02:30 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123