div hide in php

Solutions on MaxInterview for div hide in php by the best coders in the world

showing results for - "div hide in php"
Luigi
08 Jan 2018
1$id=$this->session->userdata('user_id');
2<ul class="nav nav-pills">
3                  <?php if(isset($id)){ ?>
4                    <style type="text/css">#settings{
5display:none;
6}  #activity{
7display:inline-block;
8}</style>
9                  <li class="nav-item"><a class="nav-link active" href="#activity" data-toggle="tab">Activity</a></li>
10                <?php  }else{ ?>
11                  <style type="text/css">#activity{
12display:none;
13} #settings{
14display:inline-block;
15}</style>
16                  <li class="nav-item"><a class="nav-link active" href="#settings" data-toggle="tab">Settings</a></li>
17                <?php } ?>
18                </ul>
19                  
20                  <div class="tab-pane" id="activity">Activity</div>
21                  <div class="tab-pane" id="settings">Settings</div>