Checking parameter classes in PHP

Posted by Professor Elm on Stack Overflow See other posts from Stack Overflow or by Professor Elm
Published on 2011-11-23T17:47:30Z Indexed on 2011/11/23 17:50 UTC
Read the original article Hit count: 326

Filed under:
|
|

At the moment, I have the following:

<?php if ($custom != ""): ?> 
            <div class="head-row5" id="custom">
                <?php print $custom?>                    
            </div><?php //head-row5 ?>                  
            <?php endif; ?>

What is returned is something like....

<div class="block block-block" id="block-block-15">
    <div class="title">
        <h3></h3>
    </div>
    <div class="content"><p style="text-align: center;"><a href="website linkage" id="T2roll"><span class="alt">Name of the linked page</span></a></p>
</div>

What I'm trying to do is find a way to print this out ONLY if the is true.

How would I go about doing this?

I believe that I'm going to have to check the elements by class of this $custom parameter. However, I have no idea how to go about doing this.

© Stack Overflow or respective owner

Related posts about php

Related posts about html