Re: string to integer

From: Date: Sun, 17 Dec 2000 17:58:27 +0000
Subject: Re: string to integer
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30747@lists.php.net to get a copy of this message
Hey there, Consider this page : http://www.php.net/manual/language.types.type-juggling.php Regards, Philip --.sig [ Want to write Good code? First, write Bad code. ] On Sun, 17 Dec 2000, MC_Gurk wrote: > hello, > > here is my problem: > > i have asked a server via fputs to send me one byte. Via fgets i got the > byte, but in form of a string. For example: > > $ret=fgets($server,1); > > the server returned 23 for example, but fgets returned 23 + terminating zero > how can i transform the string to the integer 23? > > thanks for your help. > > MC_Gurk > (i would not ask if i had not tried very long 8o( ) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#30747) next »