Rabu, 21 Agustus 2013

PHP Indonesia - Facebook: agan ane mau nanya nih urgent bgt gimana ya carany...

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/ 
Compare Hotels

Find great prices for amazing hotels wherever your next destination may be. It's simple to search 100+ sites at once!
From our sponsors
agan ane mau nanya nih urgent bgt gimana ya carany...
Aug 21st 2013, 09:53, by Rani Eva Dewi

Rani Eva Dewi 9:53am Aug 21
agan ane mau nanya nih urgent bgt
gimana ya caranya kalo mau cari indeks pertama dari sebuah perulangan menggunakan for
jadi ane mau manggil isi indeks pertama dari hasil perulangan seperti ini :

misal hasil seleksi dari sintaks sql
$rows = mysql_query("select * from tabel where id = 'a'");
for($i=1; $i<=count($rows)-1; $i++) {
$buffer= "a". "$i" . "<br>";
}
echo $buffer;

misal hasil rows = 21
kan dia bakal ngulang dan nyetak "a + $i (huruf a sampe 21 kali)
nah kalo ane mau ngambil cukup agka satu nya aja gimana yah ?

hasil expected : "a1"

mungkin para mastah ada yang tau ?
makaciih iaa sebelumnya gan

Bukan Syarif 9:57am Aug 21
http://stackoverflow.com/questions/1921421/get-first-element-of-an-array

Dody Agung Saputro 9:59am Aug 21
if ($i == 0) break;

Fandi Al-Bantani 10:02am Aug 21
u can try this...
=====================
<?php
$array = array(
4 => 1,
2 => 6
);

/*
Just to be safe
*/
reset($array);

/*
Get first value
*/
echo current($array), PHP_EOL ;

/*
Get key for first value
*/
echo key($array), PHP_EOL ;
======================

nanti bisa melihat perbedaan'a..
hehehhehe..
*cmieeewwwwwkaburrrrrrrrr...

Rani Eva Dewi 10:05am Aug 21
php eol apaan?

Fandi Al-Bantani 10:07am Aug 21
just info about php version..

PHP_EOL (string)
The correct 'End Of Line' symbol for this platform. Available since PHP 4.3.10 and PHP 5.0.2

Adhie Purwa Sasmita 10:08am Aug 21
pengganti <br> atau <br> versi PHP hehe??

Rani Eva Dewi 10:13am Aug 21
but i got this:
Parse error: syntax error, unexpected T_STRING in /home/jafaikco/public_html/kucing/kucing.php on line 54
and it shown about PHP_EOL;

Fandi Al-Bantani 10:22am Aug 21
can u show me ur script...

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