Afficher la liste déroulante

fgetc()

« ezmlm_hash | fgetcsv »
<?php
// loads some data in a temp file
file_put_contents(
    
"/tmp/pbe.txt",
    
 // mixed $data
);

$count =
    
// int $count

$handle fopen("/tmp/pbe.txt""r");

for (
$i 0$i $count$i++) {
    
fgetc($handle);
}

$string fgetc (
    
  // resource $handle
);
?>
Résultat
$string = 'o'
Exemples
#1 fgetc  (/* $data = "Hello !" */
 /* $count = 4 */
 /* $handle = $handle */
)
#2 fgetc  (/* $data = "Hello !" */
 /* $count = 10 */
 /* $handle = $handle */
)
#3 fgetc  (/* $data = "Hello !" */
 /* $count = 0 */
 /* $handle = 123 */
)
Voir aussi
fgetcsv, fgets, fread