Search the Community
Showing results for tags 'else'.
-
I am writting a document management application which is running a very large if statement, similar to if(($filetype == jpeg)||(filetype == gif)){ $type = "Image"; }elseif... and so on it's about 180 lines. The Problem is I can do it in an array as well, an array will be less code. but is it faster? I am talking large amounts my software knows 600 different extensions with 380 different icons assigned to the file type. I need to know for performance which is faster? and array or an if and ifelse? If I could get assistance that would be good. I would test it myself but rewritting as array for no reason if an if statement is the faster of the two. Thanks.
-
The first block of code is what i want to use since i know it works, but i dont know how to use it with the code already there. <?php if (strpos($_SERVER['REQUEST_URI'], 'upload.php') == false) { echo 'the stuff below is removed, or if the URL is something else, its not removed' ?> This code is already in my form and can not be changed!!! This is what I want to remove totally if the URL is upload.php <div class="navbar" name"navbar" Id="navbar"> <div class="navbar-inner" name="navbar-inner" Id="navbar-inner">' <?php echo a_view('core/account/login_dropdown'); ?> <?php echo a_view_menu('topbar', array('sort_by' => 'priority', array('menu-hz'))); ?> <?php echo a_view('search/search_box', array('class' => 'search-header')); ?> </div> </div> Can anyone help?