Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.lang.php > #3181
| From | Eric Demeester <neuneu@potiron.invalid> |
|---|---|
| Newsgroups | fr.comp.lang.php |
| Subject | Re: $variable++ qui ne marche pas? |
| Date | 2019-12-11 09:40 +0100 |
| Organization | Drosophiles Inc. |
| Message-ID | <0ia1ve94ru71ggb38fbpcb6kuqa8fbqbr2@4ax.com> (permalink) |
| References | <5def03f3$0$3860$426a34cc@news.free.fr> <qsns4e$2a52$1@cabale.usenet-fr.net> <5def7e1e$0$3874$426a74cc@news.free.fr> <lfivue9jiodfeqlddk7m7fpi40nkp39kus@4ax.com> <qsopje$2q8r$1@cabale.usenet-fr.net> |
Bonjour, Olivier Miakinen (Tue, 10 Dec 2019 19:53:34 +0100 - fr.comp.lang.php) : > Le 10/12/2019 à 17:59, Otomatic a écrit : > > $counter n'est pas numérique mais une chaîne de caractères. > > > > On peut forcer le type en numérique entier par : > > $counter = (int)fgets($fp, 20); > > > > et là, $counter++; ne pose plus de problème. > > Voilà qui me semble une excellente analyse du problème. Pas mieux. En plus de tes précieux conseils, quand quelque chose ne fonctionne pas, j'ai l'habitude d'afficher les valeurs des variables à l'écran (echo ou var_dump selon les cas) et leur évolution, ça permet souvent de constater qu'on n'obtient pas le résultat attendu, et peut donner des pistes pour comprendre pourquoi.
Back to fr.comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar
$variable++ qui ne marche pas? jp <bloiiing@yahoo.invalid> - 2019-12-10 02:33 +0000
Re: $variable++ qui ne marche pas? Eric Demeester <neuneu@potiron.invalid> - 2019-12-10 09:45 +0100
Re: $variable++ qui ne marche pas? jp <bloiiing@yahoo.invalid> - 2019-12-10 09:49 +0000
Re: $variable++ qui ne marche pas? Otomatic <otomatic@oto.invalid> - 2019-12-10 11:24 +0100
Re: $variable++ qui ne marche pas? Olivier Miakinen <om+news@miakinen.net> - 2019-12-10 11:31 +0100
Re: $variable++ qui ne marche pas? jp <bloiiing@yahoo.invalid> - 2019-12-10 11:15 +0000
Re: $variable++ qui ne marche pas? Otomatic <otomatic@oto.invalid> - 2019-12-10 17:20 +0100
Re: $variable++ qui ne marche pas? jp <bloiiing@yahoo.invalid> - 2019-12-10 11:16 +0000
Re: $variable++ qui ne marche pas? Otomatic <otomatic@oto.invalid> - 2019-12-10 10:07 +0100
Re: $variable++ qui ne marche pas? Olivier Miakinen <om+news@miakinen.net> - 2019-12-10 11:30 +0100
Re: $variable++ qui ne marche pas? jp <bloiiing@yahoo.invalid> - 2019-12-10 11:14 +0000
Re: $variable++ qui ne marche pas? Didier <nospam@invalid.fr> - 2019-12-10 14:58 +0100
Re: $variable++ qui ne marche pas? jp <bloiiing@yahoo.invalid> - 2019-12-10 14:23 +0000
Re: $variable++ qui ne marche pas? Otomatic <otomatic@oto.invalid> - 2019-12-10 16:17 +0100
Re: $variable++ qui ne marche pas? jp <bloiiing@yahoo.invalid> - 2019-12-12 14:24 +0000
Re: $variable++ qui ne marche pas? Denis Beauregard <denis.b-at-francogene.com.invalid@nospam.com.invalid> - 2019-12-10 11:32 -0500
Re: $variable++ qui ne marche pas? Otomatic <otomatic@oto.invalid> - 2019-12-10 17:59 +0100
Re: $variable++ qui ne marche pas? Olivier Miakinen <om+news@miakinen.net> - 2019-12-10 19:53 +0100
Re: $variable++ qui ne marche pas? Eric Demeester <neuneu@potiron.invalid> - 2019-12-11 09:40 +0100
Re: $variable++ qui ne marche pas? Otomatic <otomatic@oto.invalid> - 2019-12-11 10:17 +0100
csiph-web