Programming
|
*
Smarty in array
Smarty
Smarty
Smarty in array
smarty {if $current_item| in_array :$selected_array} OR {if in_array ($current_item,$selected_array)} |
|
*
Smarty substring - truncate
Smarty
Smarty
Smarty substring - truncate
smarty Example; retrieve a small part (substring) of a string. {$str| truncate :30:"...": true } - false - truncate at a word boundary - true - truncate at ... |
|
*
Array loop
Javascript
|
|
*
Force page breaks while converting HTML to PDF
Css
Css
Force page breaks while converting HTML to PDF
catalin P.breakhere { page-break-before : always } Define the following CSS style for the element ( <TABLE>, <P> or <HR> or another) to force page break after the element: Examples: HR { ... |
|
*
Get directory
Php
Php
Get directory
catalin string getcwd ( void ) Gets the current working directory. <?php echo getcwd () . "\n" ; // output home/dir chdir ( 'cvs' ); ... |
|
*
Layer on top
Css
Css
Layer on top
catalin LAYER 1 ON TOP: <div style="position: relative; font-size: 50px; z-index: 2 ;">LAYER 1</div> <div style="position: relative; top: -50px; left: 5px; color: red; z-index: 1 ;">LAYER 2</div> |
|
*
Element focus
Mootools
|
|
*
String replace
Javascript
|
|
*
Smarty foreach last
Smarty
Smarty
Smarty foreach last
smarty {foreach item=item key=key from=$vars name ='catgs'} {if $smarty.foreach. catgs. last } {/if} {/foreach} |