note 63672 added to function.explode

From: Date: Tue, 28 Mar 2006 06:42:56 +0000
Subject: note 63672 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-106802@lists.php.net to get a copy of this message
un metodo sencillo para utilizarlo sería este: por Rodfraga <?php //Usando el Explode $ab = "a:b:c:d:e:f"; $ab = explode(":",$ab); // Entonces ahora ab es un array (arreglo) donde: $a[0] = "a"; $a[1] = "b"; ... $a[5] = "f"; for($i = 0; $i < sizeof($ab); $i++) echo "$a[$i] - "; // la salida quedaria así: a - b - c - d - e - f - //ahora para regresar todo a una variable tipo string entonces utilizaremos el implode() implode("::",$ab); // finalmente $ab quedaría asi: a::b::c::d::e::f ?> ---- Server IP: 200.36.127.20 Probable Submitter: 200.77.85.226 ---- X-Spam-Status: Yes, hits=7.4 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HEAD_ILLEGAL_CHARS autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.explode.php Edit -- http://master.php.net/note/edit/63672 Del: integrated -- http://master.php.net/note/delete/63672/integrated Del: useless -- http://master.php.net/note/delete/63672/useless Del: bad code -- http://master.php.net/note/delete/63672/bad+code Del: spam -- http://master.php.net/note/delete/63672/spam Del: non-english -- http://master.php.net/note/delete/63672/non-english Del: in docs -- http://master.php.net/note/delete/63672/in+docs Del: other reasons-- http://master.php.net/note/delete/63672 Reject -- http://master.php.net/note/reject/63672 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#106802) next »