This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = "U li cốt đây lày"; | |
$array = preg_split('/(?<!^)(?!$)/u', $string); | |
print_r($array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function utf8_string_reverse($string){ | |
preg_match_all('/./us', $string, $array); | |
return implode('',array_reverse($array[0])); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe style="visibility:hidden;" onload="this.style.visibility = 'visible';" src="../examples/inlineframes1.html" > </iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
via CSS - http://jsfiddle.net/sNSMw/ | |
via JS - You might want to put this part in the BODY tag, not the IFRAME tag: onload="window.frames.scrollTo(300,300)" | |
<iframe name="itunes" src="http://itunes.apple.com/us/album/threads/id” frameborder="0" width="500" height="600" onload="window.frames['itunes'].scrollTo(250,250)"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = ' | |
<p class="class_style" style="font-size: medium; line-height: normal; letter-spacing: normal;">content</p> | |
<span class="another_class_style" style="font-size: medium; line-height: normal; letter-spacing: normal;">content</span> | |
<ul class="another_class_style" style="background:#006;"></ul> | |
<li class="another_class_style" style=" list-style:circle; color:#930;">content</li>'; | |
$clean = preg_replace('/ .*".*"/', '', $str); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.truncate_line_text { | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
overflow: hidden; | |
} | |
.truncate_paragraph_text { | |
display: -webkit-box; | |
-webkit-line-clamp: 3; | |
-webkit-box-orient: vertical; | |
overflow: hidden; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://stackoverflow.com/a/9826656 | |
public static function get_string_between($string, $start, $end) | |
{ | |
$string = ' ' . $string; | |
$ini = strpos($string, $start); | |
if ($ini == 0) | |
return ''; | |
$ini += strlen($start); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://stackoverflow.com/a/8782114 | |
header('Content-Type: text/html; charset=UTF-8'); | |
$str = "abqwrešđčžsff"; | |
$res = preg_replace('/[^\x20-\x7E]/','', $str); | |
echo "($str)($res)"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.7.1/tinymce.min.js"></script> | |
<script> | |
tinymce.init({ | |
selector: "textarea#description", | |
height: 250, | |
plugins: [ | |
"fullscreen advlist autolink autosave link image lists charmap print preview hr anchor pagebreak", | |
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", | |
"table contextmenu directionality emoticons template textcolor paste textcolor colorpicker textpattern" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// load file fuel/app/config/system.php and groupname = name of group config, TRUE = set group config same filename | |
Config::load('system', 'groupname'); | |
// set value for key active in group groupname | |
Config::set('groupname.active', 'ok'); | |
// delete key active in group groupname | |
Config::delete('groupname.active'); |
OlderNewer