It's possible to combine a php if statement if i have for example this code:
<div id="contentArea">classic content field</div>
This id is html, and my question is, can i do a if statement with php if my html id is not empty...
for example so:
if(!empty('MY_HTML_ID')) { echo '<div id="contentArea"></div>'; }
Why PHP? You should use something like that (jquery example):
if( $('#MY_HTML_ID').is(':empty') ) { }
or:
if( $('#MY_HTML_ID:empty').length ) { }
Edit: If you are using a template system, you can also check the variable inside of the div, for example with this logic:
<div>
<% if $MyDinner %>
You can do the request
<% else %>
You can't, because the variable $MyDinner has no value
<% end_if %>
</div>