Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7957643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:16:52+00:00 2026-06-04T04:16:52+00:00

<?php echo c2c_get_custom(‘contactname’, ‘<strong>Contact: ‘, ‘</strong>’); ?></br> <?php echo c2c_get_custom(‘address’, ”, ‘</br>’); ?></br> <?php

  • 0
    <?php echo c2c_get_custom('contactname', '<strong>Contact: ', '</strong>'); ?></br>
    <?php echo c2c_get_custom('address', '', '</br>'); ?></br>
    <?php echo c2c_get_custom('mailingaddress', '', ''); ?></br>
    <?php echo c2c_get_custom('Town', '', ', MB'); ?></br>
    <?php echo c2c_get_custom('phone_1', 'Phone:', ''); ?></br>
    <?php echo c2c_get_custom('phone_2', 'Phone:', ''); ?></br>
    <?php echo c2c_get_custom('phone_tollfree', 'Toll Free:', ''); ?></br>
    <?php echo c2c_get_custom('email', 'Email:', ''); ?></br>
    <?php echo c2c_get_custom('website', 'Website:', ''); ?></br>

How do I have it so that if There is no Value for the phone_2 Value that the </br> isn’t there after . . .or basically if the value is null to have no </br>

I am guessing this will be an if statement, I am just BRAND new to all of this. . .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:16:53+00:00Added an answer on June 4, 2026 at 4:16 am

    The definition of the function is such:

    function c2c_get_custom( 
        $field, 
        $before='', 
        $after='', 
        $none='', 
        $between='', 
        $before_last=''
    )
    

    Acquired from here: http://wordpress.org/extend/plugins/get-custom-field-values/other_notes/

    Therefore each line should look similar to this:

    c2c_get_custom('phone_2', 'Phone:', '<br />', '');
    

    If the above does not work then the following should suffice:

    <?php 
       $phone2 = c2c_get_custom('phone_2', 'Phone:', ''); 
       echo (is_null($phone2) || $phone2 == '' ? '' : $phone2.'<br />')
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

PHP Echo or Print functions does not show anything when php is busy with
PHP echo function is not outputing strings in the format of html tag like
Given hello.php: <?php echo Hello; ?> rendering the page works fine and returns Hello
For example… This PHP code <?php echo '<html>'; echo '<body>'; echo '<h1>Header One</h1>'; echo
How do I echo a forwardslash / ? echo <?php echo $_SERVER['HTTP_HOST'] ?> .
<?php echo $_POST['ss'];?> <form action=<?php echo $_SERVER['PHP_SELF'];?> method=post> <input name=ss type=text /> <input type=submit
<?php echo $form->create(); ?> <?php echo $form->hidden('id'); ?> <?php echo $form->input('name')); ?> <?php echo
I use <?php echo __("this is my string"); ?> inside my views to display
$.post('includes/script.php', $(this).serialize(), function(data) { $('body').append(data); }); alert ($('#new').length) php script is <php echo <div
I'm echoing a php string variable into html <span class=title_resource> <?php echo $titulo; ?>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.