Senin, 12 Agustus 2013

PHP Indonesia - Facebook: gan, cek array pke foreach dan in_array cepet mana...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
gan, cek array pke foreach dan in_array cepet mana...
Aug 12th 2013, 19:31, by C Rieqy IfndefXor PetangatusteluForbidden

C Rieqy IfndefXor PetangatusteluForbidden 7:31pm Aug 12
gan, cek array pke foreach dan in_array cepet mana ?
dan cara ngecek speednya gmana ?

$str = "string";
$file = file("file.txt");
$file = str_replace(array("\n", "\r", "\r\n"), "", $file);
foreach($file as $line){
if(!strcmp($str, $line))echo "sudah ada\n";
}
echo in_array($str, $file) ? "sudah ada\n" : null;

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar