|
||||
tambahan utk no 2: kalau nak guna variable dalam string kene guna ( " )
contoh PHP Code:
1: Selsema Ayam \t2: Selsema $burung\n
__________________
http://sidik.org/ Last edited by Gemp-X; 30-09-2004 at 01:59 PM. |
|
||||
but if we want to use escape character like '\n' (newline) or '\t'(tab)we should use ( " ) .
if we use ( ' ) , we should manually use return(Enter) or tab key, to make newline or tab in the output eg : both output will be selsema burung PHP Code:
__________________
http://sidik.org/ Last edited by Gemp-X; 30-09-2004 at 02:01 PM. |
|
||||
i mean output = html code (the source), not the output by browser, just to make our html tidy, with proper newline and tabbed
for instance PHP Code:
Code:
Lorem ipsum dolor sit amet, <br /> consectetuer adipiscing elit. <br /> Donec molestie of course the output by browser will be: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec molestie
__________________
http://sidik.org/ Last edited by Gemp-X; 30-09-2004 at 08:54 PM. |
|
||||
Comparison #1
================= Aku rasa #2 faster than #1.Sebabya, $data = " test"; $data .= "test2"; // ini akan consume more memory so Nih result dia : http://cms.arl.net.my/fallujah/comparison.php |
|
||||
i think this comparison has some bias
cuba ubah kedudukan atas tukar bawah, result dia akan berbeza. to ensure the result is not biased, run each in 2 different files try modified code ni untuk comparison 1 PHP Code:
(using $data ) Lorem ipsum danga bay the lost empire of Troy Time taken:0.000053167secs no 2 (using $data[]) Lorem ipsum danga bay the lost empire of Troy Time taken:0.000056982secs #using $data[] implode a bit slower (berapa banyak kali daa aku ubah,hehe. yang ni betul ni)
__________________
http://sidik.org/ Last edited by Gemp-X; 01-10-2004 at 12:04 PM. |















