Checking if string contains numbers
is_numeric doesnt check strings for numbers. You need to use preg_match('#[0-9]#',$string)
is_numeric doesnt check strings for numbers. You need to use preg_match('#[0-9]#',$string)
There are mb_strlen() and mb_substr() for multibyte characters however there is no mb_str_word_count. Hence my previous post.
There are a few issues (things I dont like) about the bootstrap accordion: 1- The title is inline, so you have to click the text part to activate it 2- There is no indication if the item is collapsed or open 3- :hover underlining is obnoxious. To solve all these; simply add the below css:…
Actually, you do not want to open memcached port in your firewall. #ref: http://serverfault.com/questions/530051/memcached-ports-and-csf
I’ve been pulling my hair why my custom cursor wouldnt work. Turns out, IE (yes, big surprise) takes site url instead of stylesheet as baseurl when it comes to cursors.
Ways to load an array from file into a variable: 1- $var = require ‘myarray.php’; // or include // myarray.php contents return array(“test”,”test2″); 2 – require ‘myarray.php’; // or include // myarray.php contents $var = array(“test”,”test2″); Use $var as you would normally. 3- $var = file_get_contents(‘myarray.php’); // myarray.php contents array(“test”,”test2″);
Türkçe veya diğer özel -multibyte- karakterler için malesef PHP str_word_count(), strlen() gibi fonksiyonlarda yanlış sayım veriyor, her özel karakter 2 kelime / karakter sayılıyor. Bunu aşmak için iconv() transliteration da denedim ama kâr etmedi. Araştırmalarımda da tek -garanti- çözümün şüpheli karakterleri replace etmek olduğunu buldum ama her Türkçe karakteri (ve muhtemel diğer yabancı karakterleri) hardcode…