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

  • Home
  • SEARCH
  • 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 8967341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:13:16+00:00 2026-06-15T17:13:16+00:00

I have this PHP code: <? $shopsite_templates = array( array(‘tmpl_1’, ‘Template 1’), array(‘tmpl_2’, ‘Template

  • 0

I have this PHP code:

<?
$shopsite_templates = array(
    array('tmpl_1', 'Template 1'),
    array('tmpl_2', 'Template 2'),
    array('tmpl_3', 'Template 3'),
    array('tmpl_4', 'Template 4')

);
?>

And a html and php code that created a list of those templates:

<? foreach ($shopsite_templates as $value) {?>
    <? for ($i = 0; $i < count($shopsite_templates); $i++){ ?>
        <div style="float: left;">
            <div id="reg_web_tmp_box">
            <div class="temp_name"><strong><? echo $shopsite_templates[$i][1]; ?></strong>
        </div>
        <div class="select">
            <div class="reg_selectradio"><input name="edittmpl" type="radio" id="tmpl_<? echo $i; ?>" value="<? echo $shopsite_templates[$i][0]; ?>"<? if ($formitems['tmpl'] == $shopsite_templates[$i][0]) { ?> checked="checked"<? }; ?> /> <? echo $langdata['registshop_temp_select']; ?></div>
        </div>
        <div class="clear"></div>
    </div>
</div>
    <? }; ?>
<? }; ?>

Everything is working fine, but I want for example tmpl_4 (template 4) not to be in the list. I cannot delete it, it must figure in $shopsite_templates but not in this list.

I need this because I have several Free templates that i offer to my costumers, and i have some templates that i dont want to offer them, but i need to use it for further business.

I hope you gurus will understand my question. Please help me!

  • 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-15T17:13:17+00:00Added an answer on June 15, 2026 at 5:13 pm

    You can have items you don’t want displayed in array like this:

    $hide=array(1,5);
    

    And then in for loop just do:

    <? for ($i = 0; $i < count($shopsite_templates); $i++){ 
            if(!in_array($i,$hide)){
             //echo your templates html or whatever
      ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this php code $jsonArray = array(); $sql = SELECT ID,CLIENT FROM PLD_SERVERS;
I have this PHP code - <?php for($i=1; $i<=1000; $i++) { $array=array(); $array[$i]=54*$i; $arr=array($array[$i].,);
<a href=tags.php onclick=return popitup('tags.php')>tags</a> I have this line of code that runs the javascript
I have this php code: $images=array(); $root = $_SERVER['DOCUMENT_ROOT'].'SV'; for ($i=1; $i<=$total_pics; $i++){ $images[]=$root.'/ad_images/'.$category.'/thumbs/'.$id_stripped.'_'.$i.'.jpg';
I have this PHP code that refuses to work when called from the browser,
I have this HTML code generating by php code <tr class=edit_tr> <td>a1</td> <td class=edit_td>
I have this PHP code that resizes images perfectly: smart_resize_image(path/to/image.jpg); Now I want to
I have this php code $ids = array(1,2,3); $names = array(cat,elephant,cow); $originalSettings = array
I have this php code line $data['viewData']['filter'] = isset($parameters['filter']) ? $parameters['filter'] : array('filter1', 'filter2',
I have this php code that get items from the database and i have

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.