substr function...

From: Date: Wed, 25 Oct 2000 16:27:29 +0000
Subject: substr function...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21818@lists.php.net to get a copy of this message
I have problem with the substr function, I now it looks very, very simple, but I guess my brain is't working today at all... this is the code... $inicio=1; $long=10; while (!feof($file)) { $line = fgets($file, 1024); echo "--$line--"; $x=substr($line, $inicio, $long); echo "</br>El substring desde $inicio con longitud $long es *$x*"; echo "</br>"; --SID = 9269115590 -- El substring desde 1 con longitud 10 es *ID * --SID = 6567197997 -- El substring desde 1 con longitud 10 es *ID * --SID = 6269193575 -- I'm expecting *ID = 92691* *ID = 62691* What's going on ??... Ing. J@vier Morquecho Morquecho Cedetel Desarrollo de proyectos comerciales Tel : 177-10-87 Cel : 177-00-87 e-mail : jmorquec@cedetel.com.mx e-movil : 5281770087@emovil.cedetel.com.mx Home Cedetel : http://www.cedetel.com.mx "#define QUESTION ((bb) || !(bb)) // Shakespeare"

« previous php.general (#21818) next »